{"version":3,"sources":["webpack:///./src/core/services/slots-assign-rules-service/protocol-constants.ts","webpack:///./src/views/components/DeviceAndSlotDetail/SlotItem/SlotItem.ts","webpack:///./src/views/components/DeviceAndSlotDetail/DeviceAndSlotDetail.scss?fc27","webpack:///./src/views/components/DeviceAndSlotDetail/SlotItem/SlotItemOverview.vue?7efe","webpack:///./src/views/components/DeviceAndSlotDetail/SlotItem/SlotItemOverview.ts","webpack:///./src/views/components/DeviceAndSlotDetail/SlotItem/SlotItemOverview.vue","webpack:///./node_modules/core-js/modules/es.array.flat-map.js","webpack:///./node_modules/core-js/modules/es.array.unscopables.flat-map.js","webpack:///./src/assets/images/icons/icon-arrows-down.svg","webpack:///./src/assets/images/icons/icon-checkbox-disabled.svg","webpack:///./src/assets/images/icons/icon-add-circle-outline.svg","webpack:///./node_modules/core-js/internals/flatten-into-array.js","webpack:///./node_modules/core-js/modules/es.array.splice.js","webpack:///./src/views/components/DeviceAndSlotDetail/DeviceAndSlotDetail.vue?393f","webpack:///./src/views/components/DeviceAndSlotDetail/SlotItem/SlotListItem.vue?cf25","webpack:///./src/core/services/slots-assign-rules-service/slots-assign-rules-service.ts","webpack:///./src/core/services/slots-assign-rules-service/slots-assign-rules-automation-actuator-service.ts","webpack:///./src/core/services/slots-assign-rules-service/mx-constants.ts","webpack:///./src/core/services/slots-assign-rules-service/slots-assign-rules-config.ts","webpack:///./src/core/services/slots-assign-rules-service/slots-assign-rules-automation-commands-service.ts","webpack:///./src/core/services/slots-assign-rules-service/slots-assign-rules-commands-and-groups-service.ts","webpack:///./src/core/services/slots-assign-rules-service/slots-assign-rules-thermo-cooling-actuator-service.ts","webpack:///./src/core/services/slots-assign-rules-service/slots-assign-rules-thermo-cooling-pump-service.ts","webpack:///./src/core/services/slots-assign-rules-service/slots-assign-rules-thermo-heating-actuator-service.ts","webpack:///./src/core/services/slots-assign-rules-service/slots-assign-rules-thermo-heating-pump-service.ts","webpack:///./src/core/services/slots-assign-rules-service/slots-assign-rules-thermo-shared-actuator-service.ts","webpack:///./src/core/services/slots-assign-rules-service/slots-assign-rules-thermo-shared-pump-service.ts","webpack:///./src/views/components/DeviceAndSlotDetail/SlotItem/SlotListItem.ts","webpack:///./src/views/components/DeviceAndSlotDetail/SlotItem/SlotListItem.vue","webpack:///./src/views/components/DeviceAndSlotDetail/DeviceAndSlotDetail.ts","webpack:///./src/views/components/DeviceAndSlotDetail/DeviceAndSlotDetail.vue","webpack:///./src/views/components/DeviceAndSlotDetail/DeviceSlotsListOverview/DeviceSlotsListOverview.vue?31fe","webpack:///./src/views/components/DeviceAndSlotDetail/DeviceSlotsListOverview/DeviceSlotsListOverview.ts","webpack:///./src/views/components/DeviceAndSlotDetail/DeviceSlotsListOverview/DeviceSlotsListOverview.vue"],"names":["ProtocolConstants","MinimumThermostatTemperature","MaximumThermostatTemperature","Device1_0_12","Device0_0_121","Device1_0_130","Device1_0_144","Device1_0_145","Device1_0_149","Device1_0_152","Device1_1_2","Device1_1_3","Device1_1_6","Device1_1_16","Device1_1_21","Device1_1_46","Device1_1_48","Device1_1_49","Device1_1_82","Device1_2_2","Device1_2_3","Device1_2_16","Device1_2_46","Device1_2_48","Device1_2_82","Device1_3_2","Device1_3_3","Device1_3_6","Device1_3_16","Device1_3_21","Device1_3_27","Device1_3_28","Device1_3_31","Device1_3_46","Device1_3_48","Device1_3_49","Device1_3_82","Device1_5_9","Device1_5_31","Device1_5_88","Device1_5_91","Device1_5_97","Device1_5_98","Device1_5_121","Device1_5_117","Device1_5_118","Device1_5_119","Device2_0_130","Device2_0_144","Device2_0_145","Device2_0_149","Device2_2_17","Device2_2_21","Device2_2_27","Device2_2_152","Device2_4_2","Device2_4_3","Device2_4_6","Device2_4_16","Device2_4_17","Device2_4_21","Device2_4_46","Device2_4_48","Device2_4_49","Device2_4_82","Device5_0_3","Device5_0_4","Device5_0_5","Device5_0_77","Device6_8_2","Device6_8_6","Device6_8_16","Device1_5_120","Device1_0_78","Device2_0_78","Device1_0_79","Device2_0_79","Device1_0_31","Device1_0_162","Device2_0_162","Device1_0_159","Device2_0_159","Device1_0_174","Device2_0_174","Device1_0_141","Device2_0_141","Device1_0_164","Device2_0_164","Device1_0_138","Device2_0_138","Device1_0_104","Device1_0_105","Device1_0_129","Device1_0_137","Device1_0_161","Device2_0_129","Device2_0_137","Device2_0_161","Device1_0_133","Device1_0_135","Device1_0_165","Device2_0_133","Device2_0_135","Device2_0_165","Device1_0_47","Device2_0_47","Device1_1_107","Device1_2_107","Device1_3_107","Device2_2_107","Device2_4_107","Device6_8_107","Device1_0_163","Device2_0_163","SlotItem","FirstElement","OneElement","TwoElements","this","linkableObject","isAdd","objectSlot","status","NotConfigured","NotUsed","Configured","MarkedForLinking","isCommutable","isConfiguredMine","device","componentTypes","some","c","ShutterActuatorCommand","isWizardLeftPanel","ruleServiceType","AUTOMATION_ACTUATOR","assignedComponentType","Actuator","AUTOMATION_COMMAND","COMMANDS_AND_GROUPS","includes","Command","isShutterActuatorDevice","currentStepAssignableComponentType","linkedObjects","x","id","isShutterActuatorCommandSlotSelectedInThisStep","currentThermoActuatorType","currentStepAssignableThermoActuatorType","linkedRoomObject","thermoActuatorTypes","THERMO_COOLING_ACTUATORS","THERMO_HEATING_ACTUATORS","THERMO_SHARED_ACTUATORS","THERMO_PROBE","Probe","THERMO_THERMO","Thermo","THERMO_HEATING_PUMPS","THERMO_COOLING_PUMPS","THERMO_SHARED_PUMPS","name","props","type","Object","required","Boolean","default","Number","render","_ctx","_cache","$props","$setup","$data","$options","class","slotDotClass","slotIcon","__exports__","$","flattenIntoArray","toObject","toLength","aFunction","arraySpeciesCreate","target","proto","flatMap","callbackfn","A","O","sourceLen","length","arguments","undefined","addToUnscopables","module","exports","isArray","bind","original","source","start","depth","mapper","thisArg","element","targetIndex","sourceIndex","mapFn","TypeError","toAbsoluteIndex","toInteger","createProperty","arrayMethodHasSpeciesSupport","HAS_SPECIES_SUPPORT","max","Math","min","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_LENGTH_EXCEEDED","forced","splice","deleteCount","insertCount","actualDeleteCount","k","from","to","len","actualStart","argumentsLength","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","key","_hoisted_5","_hoisted_6","_hoisted_7","_component_DeviceSlotsListOverview","_component_InlineSvgScoped","_component_Button","_component_Card","_component_SlotListItem","isExpanded","content","model","isOnlyDeviceSelection","slotList","compatibleSlots","onClick","addDevice","isSingleDeviceSelection","src","$t","_","removeDevice","toggleExpand","slot","showBar","_component_Checkbox","_component_Dialog","slotName","index","linkDescription","binary","modelValue","isSlotSelected","disabled","toggleSlot","popupData","header","warningTitle","visible","isWarningRequested","$event","visibleModifiers","sync","style","width","modal","footer","isConfirmation","label","doNoCommandBtn","doYesCommandBtn","autofocus","doAlertCommandBtn","warningMessage","isPresetWarningRequested","doPresetNoCommandBtn","doPresetYesCommandBtn","roomObject","noOfAdjacent","thermoActuatorType","modalityTypeConfiguration","workflowCallback","slotRuleServiceType","_noOfAdjacent","FourConfigurationSteps","FiveConfigurationSteps","OneAdjacent","TwoAdjacent","ThreeAdjacent","FourAdjacent","FiveAdjacent","MaximumNoOfThermostatSlots","MaximumNoOfDeviceSlots","FourthSlot","TwoSlots","CountReset","_thermoActuatorType","_modalityTypeConfiguration","_workflowCallback","isSlotLinkedWithCurrentRoomObject","data","i18n","global","t","_isUnlinkFlow","doYesCommand","doNoCommand","isSlotRoomObjectTypeMatchingAndNotLinked","isSlotLinkedAsPump","markOrUnmarkSlot","tmp","slots","filter","sl","slotHasAdjacentSlots","_adjacentSlotVm","DimmerActuator","canHandleDoubleDimmer","_isSingleLoadFlow","currentStatus","nextStatus","isDeviceWithPairSelection","tmpThermoActuatorType","getCurrentThermoActuatorType","isSlotThermoActuatorType","HeatingAndCoolingPump","HeatingAndCoolingValve","numOfAdjacentToSelect","Shutter","isShutterWithPosition","adjacentSlots","getAdjacentSlotsToMark","isLimitationReached","doAlertCommand","updateLinking","sort","a","b","getAdjacentSlotsToUnmark","tmpActuatorType","HeatingPump","CoolingPump","SharedPump","isHeatingAndCoolingPresent","s","removeOrUpdateSlot","updateForSlotChanging","addOrUpdateSlot","slotViewModel","devices","addSlotThermoActuatorType","None","configurationType","countLinked","isSelectedInAdjacent","push","selectedSlotIndex","indexOf","expandedComponentCount","i","isSlotCompatibleForUnmarking","JSON","stringify","shift","_selectedSlotVm","fixedCouple","isSetting","isSlotCompatibleForMarking","selectedSlotViewModel","adjacentSlotViewModel","isHeatingAndCooling","isDoubleDimmer","updateMostrineStatus","Mostrine","systemControlType","OneOnOffValve","TwoTubesProportionalValve","TwoTubesProportionalSpeedControlValve","FourTubesProportionalValve","FourTubesProportionalSpeedControlValve","OneOpenCloseValve","OneProportionalValve","TwoTubesOnOffValve","FourTubesOnOffValve","roomObjectId","MarkedAdjacent","Blind","_device","_slotList","BlindActuator","ShutterActuator","F43002","F43004","F430R8","F430R3V10","F430V10","F401","K8002S","H4661M2","K4672M2S","K4652M2","K4652M3","F428","H4652_3","ModelBT3454","ModelKG4691","ModelKW4691","ModelLN4691","Model067459","Model64170","deviceConstants","automationCommandsSpecialDevices","isDevice15117orDevice15121orDevice15119","isDevice3477","isDeviceF428","isDeviceCrystal8Scene","is8BtnDeviceOrCrystalDeviceWithPairSelection","modelObject","lightType","Dimmer","isSpecialDeviceF428","adjacentSlotVm","updateConfigurationType","_isMostrineFlow","isShutterRoomObject","isActuatorModelCorrect","d","isLastComponentCollapsed","commandCanHandlePreset","hasCommandThatCanHandlePreset","deviceHasCorrectFunctionType","functionType","All","Automation","devicheHasModel","deviceIsActuatorWithAbailableSlots","canHandlePreset","areSlotsCompatibleForPresetManagement","doPresetYesCommand","doPresetNoCommand","Preset","isLinkedWithCurrentRoomObject","find","temSlots","CoolingValve","actuatorModalityType","getNoOfAdjacentSlots","coolingSystemControlType","HeatingValve","heatingSystemControlType","Mixed","isSameSystemControlType","slotsToBeMarked","noOfSelectedValves","noOfSlotsToBeAddedInParam","Separate","SharedValve","sharedSystemControlType","ruleSetClassMapping","ruleSetClassToInstantiate","slotRuleService","obj","toString","noOfLinkedRoomObjects","copyLinkedRoomObjects","item","valveOrFancoilControlType","toLowerCase","Heating","Cooling","HeatingAndCooling","thermoTypeOfObject","currentAssignActuatorStepType","onSlotMessage","SlotStatus","compatibleComponentTypes","forEach","$emit","parse","emits","components","SlotListItem","SlotItemOverview","DeviceSlotsListOverview","_component_SlotItemOverview","filteredSlotList"],"mappings":"oKAAqBA,E,qCACZ,EAAAC,6BAA+B,EAC/B,EAAAC,6BAA+B,GAE/B,EAAAC,aAAe,SACf,EAAAC,cAAgB,UAChB,EAAAC,cAAgB,UAChB,EAAAC,cAAgB,UAChB,EAAAC,cAAgB,UAChB,EAAAC,cAAgB,UAChB,EAAAC,cAAgB,UAChB,EAAAC,YAAc,QACd,EAAAC,YAAc,QACd,EAAAC,YAAc,QACd,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,YAAc,QACd,EAAAC,YAAc,QACd,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,YAAc,QACd,EAAAC,YAAc,QACd,EAAAC,YAAc,QACd,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,YAAc,QACd,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,aAAe,SACf,EAAAC,cAAgB,UAChB,EAAAC,cAAgB,UAChB,EAAAC,cAAgB,UAChB,EAAAC,cAAgB,UAChB,EAAAC,cAAgB,UAChB,EAAAC,cAAgB,UAChB,EAAAC,cAAgB,UAChB,EAAAC,cAAgB,UAChB,EAAAC,aAAe,SACf,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NC,UAAU,GAEZhC,gBAAiB,CACf8B,KAAMK,OACNH,UAAU,IAGd2U,MAAO,CAAC,aAAc,iBACtBC,WAAY,CACVC,aAAA,EACAC,oBAAA,KACAC,2BAAA,SAGiB,c,UC/CrB,MAAM,GAA2B,IAAgB,GAAQ,CAAC,CAAC,SAAS3U,KAErD,W,kDCPTgE,EAAa,CAAEzD,MAAO,wBAEtB,SAAUP,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,IAAMsU,EAA8B,8BAAkB,oBAEtD,OAAQ,yBAAc,yBAAa,MAAO5Q,EAAY,EACnD,wBAAW,GAAO,yBAAa,cAAW,KAAM,wBAAY/D,EAAK4U,kBAAkB,SAAClP,GACnF,OAAQ,yBAAc,yBAAaiP,EAA6B,CAC9DxQ,IAAKuB,EACL7I,WAAY6I,EACZ9I,MAAOoD,EAAKpD,MACZS,OAAQ2C,EAAK3C,OACbV,eAAgBqD,EAAKrD,eACrBgB,gBAAiBqC,EAAKrC,iBACrB,KAAM,EAAG,CAAC,aAAc,QAAS,SAAU,iBAAkB,uBAC9D,Q,4GCqBa,EAArB,gLAOE,WACE,OAAOjB,KAAKsI,SAAS+E,QAAO,SAACgC,GAAD,OAAQA,EAAEsB,iBAR1C,GAAqD,QAAhC,EAAuB,gBA3B3C,eAAQ,CACP9N,KAAM,kBACNC,MAAO,CACLnC,OAAQ,CACNoC,KAAMC,OACNC,UAAU,GAEZqF,SAAU,CACRvF,KAAMC,OACNC,UAAU,GAEZhD,eAAgB,CACd8C,KAAMC,QAER9C,MAAO,CACL6C,KAAMG,QACNC,SAAS,GAEXlC,gBAAiB,CACf8B,KAAMK,OACND,SAAU,IAGd0U,WAAY,CACVE,mBAAA,SAGiB,W,qBCjCrB,MAAMhU,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASV,KAErD","file":"js/chunk-fcfb38d8.a794455c.js","sourcesContent":["export default class ProtocolConstants {\n static MinimumThermostatTemperature = 3;\n static MaximumThermostatTemperature = 40.0;\n\n static Device1_0_12 = '1.0.12';\n static Device0_0_121 = '0.0.121';\n static Device1_0_130 = '1.0.130';\n static Device1_0_144 = '1.0.144';\n static Device1_0_145 = '1.0.145';\n static Device1_0_149 = '1.0.149';\n static Device1_0_152 = '1.0.152';\n static Device1_1_2 = '1.1.2';\n static Device1_1_3 = '1.1.3';\n static Device1_1_6 = '1.1.6';\n static Device1_1_16 = '1.1.16';\n static Device1_1_21 = '1.1.21';\n static Device1_1_46 = '1.1.46';\n static Device1_1_48 = '1.1.48';\n static Device1_1_49 = '1.1.49';\n static Device1_1_82 = '1.1.82';\n static Device1_2_2 = '1.2.2';\n static Device1_2_3 = '1.2.3';\n static Device1_2_16 = '1.2.16';\n static Device1_2_46 = '1.2.46';\n static Device1_2_48 = '1.2.48';\n static Device1_2_82 = '1.2.82';\n static Device1_3_2 = '1.3.2';\n static Device1_3_3 = '1.3.3';\n static Device1_3_6 = '1.3.6';\n static Device1_3_16 = '1.3.16';\n static Device1_3_21 = '1.3.21';\n static Device1_3_27 = '1.3.27';\n static Device1_3_28 = '1.3.28';\n static Device1_3_31 = '1.3.31';\n static Device1_3_46 = '1.3.46';\n static Device1_3_48 = '1.3.48';\n static Device1_3_49 = '1.3.49';\n static Device1_3_82 = '1.3.82';\n static Device1_5_9 = '1.5.9';\n static Device1_5_31 = '1.5.31';\n static Device1_5_88 = '1.5.88';\n static Device1_5_91 = '1.5.91';\n static Device1_5_97 = '1.5.97';\n static Device1_5_98 = '1.5.98';\n static Device1_5_121 = '1.5.121';\n static Device1_5_117 = '1.5.117';\n static Device1_5_118 = '1.5.118';\n static Device1_5_119 = '1.5.119';\n static Device2_0_130 = '2.0.130';\n static Device2_0_144 = '2.0.144';\n static Device2_0_145 = '2.0.145';\n static Device2_0_149 = '2.0.149';\n static Device2_2_17 = '2.2.17';\n static Device2_2_21 = '2.2.21';\n static Device2_2_27 = '2.2.27';\n static Device2_2_152 = '2.2.152';\n static Device2_4_2 = '2.4.2';\n static Device2_4_3 = '2.4.3';\n static Device2_4_6 = '2.4.6';\n static Device2_4_16 = '2.4.16';\n static Device2_4_17 = '2.4.17';\n static Device2_4_21 = '2.4.21';\n static Device2_4_46 = '2.4.46';\n static Device2_4_48 = '2.4.48';\n static Device2_4_49 = '2.4.49';\n static Device2_4_82 = '2.4.82';\n static Device5_0_3 = '5.0.3';\n static Device5_0_4 = '5.0.4';\n static Device5_0_5 = '5.0.5';\n static Device5_0_77 = '5.0.77';\n static Device6_8_2 = '6.8.2';\n static Device6_8_6 = '6.8.6';\n static Device6_8_16 = '6.8.16';\n static Device1_5_120 = '1.5.120';\n static Device1_0_78 = '1.0.78';\n static Device2_0_78 = '2.0.78';\n static Device1_0_79 = '1.0.79';\n static Device2_0_79 = '2.0.79';\n static Device1_0_31 = '1.0.31';\n static Device1_0_162 = '1.0.162';\n static Device2_0_162 = '2.0.162';\n static Device1_0_159 = '1.0.159';\n static Device2_0_159 = '2.0.159';\n static Device1_0_174 = '1.0.174';\n static Device2_0_174 = '2.0.174';\n static Device1_0_141 = '1.0.141';\n static Device2_0_141 = '2.0.141';\n static Device1_0_164 = '1.0.164';\n static Device2_0_164 = '2.0.164';\n static Device1_0_138 = '1.0.138';\n static Device2_0_138 = '2.0.138';\n static Device1_0_104 = '1.0.104';\n static Device1_0_105 = '1.0.105';\n\n static Device1_0_129 = '1.0.129';\n static Device1_0_137 = '1.0.137';\n static Device1_0_161 = '1.0.161';\n static Device2_0_129 = '2.0.129';\n static Device2_0_137 = '2.0.137';\n static Device2_0_161 = '2.0.161';\n\n static Device1_0_133 = '1.0.133';\n static Device1_0_135 = '1.0.135';\n static Device1_0_165 = '1.0.165';\n static Device2_0_133 = '2.0.133';\n static Device2_0_135 = '2.0.135';\n static Device2_0_165 = '2.0.165';\n\n static Device1_0_47 = '1.0.47';\n static Device2_0_47 = '2.0.47';\n\n static Device1_1_107 = '1.1.107';\n static Device1_2_107 = '1.2.107';\n static Device1_3_107 = '1.3.107';\n static Device2_2_107 = '2.2.107';\n static Device2_4_107 = '2.4.107';\n static Device6_8_107 = '6.8.107';\n\n static Device1_0_163 = '1.0.163';\n static Device2_0_163 = '2.0.163';\n}\n","import { Options, Vue } from 'vue-class-component';\nimport {\n ComponentType,\n DeviceDTO,\n ILinkableObject,\n Slot,\n SlotStatus,\n ThermoActuatorType,\n} from '@/../client-generator/generated-clients/plants';\nimport { PropType } from 'vue';\nimport { SlotRuleServiceType } from '@/core/services/slots-assign-rules-service/slots-assign-rules-interfaces';\nimport {\n convertThermoRuleServiceTypeToThermoActuatorType,\n getCurrentThermoActuatorType,\n} from '@/core/utils/utils';\n\n@Options({\n name: 'SlotItem',\n props: {\n device: {\n type: Object as PropType,\n required: true,\n },\n objectSlot: {\n type: Object as PropType,\n required: true,\n },\n isAdd: {\n type: Boolean,\n default: false,\n },\n linkableObject: {\n type: Object as PropType,\n },\n ruleServiceType: {\n type: Number,\n default: -1,\n },\n },\n})\nexport default class SlotItem extends Vue {\n objectSlot!: Slot;\n device!: DeviceDTO;\n isAdd!: boolean;\n linkableObject!: ILinkableObject;\n ruleServiceType!: SlotRuleServiceType; //this describes which rule service use\n\n readonly FirstElement = 0;\n readonly OneElement = 1;\n readonly TwoElements = 2;\n\n get isWizardLeftPanel() {\n return !(!this.linkableObject || this.isAdd);\n }\n\n get slotDotClass() {\n return {\n 'device-slot-dot--not-configured':\n this.objectSlot.status === SlotStatus.NotConfigured,\n 'device-slot-dot--not-used':\n this.objectSlot.status === SlotStatus.NotUsed,\n 'device-slot-dot--configured':\n this.objectSlot.status === SlotStatus.Configured ||\n (this.objectSlot.status === SlotStatus.MarkedForLinking &&\n !this.isCommutable),\n 'device-slot-dot--configured-mine':\n this.isConfiguredMine && this.isCommutable,\n 'device-slot-dot--marked-for-linking':\n this.objectSlot.status === SlotStatus.MarkedForLinking &&\n this.isCommutable,\n };\n }\n\n get slotIcon() {\n if (\n this.device.componentTypes?.some(\n (c) => c === ComponentType.ShutterActuatorCommand\n ) &&\n !this.isWizardLeftPanel //this shows circles and squares in step2/3 when selecting slots\n ) {\n return 'has--triangles';\n }\n if (\n (this.isWizardLeftPanel &&\n this.ruleServiceType == SlotRuleServiceType.AUTOMATION_ACTUATOR) ||\n (!this.isWizardLeftPanel &&\n this.objectSlot.assignedComponentType === ComponentType.Actuator)\n ) {\n return 'has--circles';\n }\n if (\n (this.isWizardLeftPanel &&\n [\n SlotRuleServiceType.AUTOMATION_COMMAND,\n SlotRuleServiceType.COMMANDS_AND_GROUPS,\n ].includes(this.ruleServiceType)) ||\n (!this.isWizardLeftPanel &&\n this.objectSlot.assignedComponentType === ComponentType.Command)\n ) {\n return 'has--squares';\n }\n return '';\n }\n\n get isShutterActuatorDevice() {\n return this.device.componentTypes?.includes(\n ComponentType.ShutterActuatorCommand\n );\n }\n\n get isShutterActuatorCommandSlotSelectedInThisStep() {\n return (\n this.isShutterActuatorDevice &&\n this.objectSlot.assignedComponentType ===\n this.currentStepAssignableComponentType &&\n (this.objectSlot.status === SlotStatus.MarkedForLinking ||\n this.objectSlot.status === SlotStatus.Configured)\n );\n }\n\n get isConfiguredMine() {\n return (\n !!this.linkableObject &&\n this.objectSlot.status === SlotStatus.Configured &&\n this.objectSlot.linkedObjects?.some(\n (x) => x.id === this.linkableObject?.id\n )\n );\n }\n\n get isCommutable() {\n return (\n this.objectSlot.status === SlotStatus.NotConfigured ||\n ((this.isConfiguredMine ||\n this.objectSlot.status === SlotStatus.MarkedForLinking) &&\n (!this.isShutterActuatorDevice ||\n this.isShutterActuatorCommandSlotSelectedInThisStep) &&\n this.objectSlot.assignedComponentType ===\n this.currentStepAssignableComponentType &&\n this.currentThermoActuatorType ===\n this.currentStepAssignableThermoActuatorType)\n );\n }\n\n get isSlotSelected() {\n return (\n this.isConfiguredMine ||\n this.objectSlot.status === SlotStatus.MarkedForLinking\n );\n }\n\n get isLinkedWithCurrentRoomObject() {\n return (\n this.objectSlot.linkedObjects?.some(\n (linkedRoomObject) => linkedRoomObject.id == this.linkableObject.id\n ) ?? false\n );\n }\n\n get currentThermoActuatorType(): ThermoActuatorType {\n return getCurrentThermoActuatorType(\n this.objectSlot.thermoActuatorTypes,\n this.linkableObject.id\n );\n }\n\n get currentStepAssignableComponentType() {\n return {\n [SlotRuleServiceType.AUTOMATION_ACTUATOR]: ComponentType.Actuator,\n [SlotRuleServiceType.AUTOMATION_COMMAND]: ComponentType.Command,\n [SlotRuleServiceType.THERMO_COOLING_ACTUATORS]: ComponentType.Actuator,\n [SlotRuleServiceType.THERMO_HEATING_ACTUATORS]: ComponentType.Actuator,\n [SlotRuleServiceType.THERMO_SHARED_ACTUATORS]: ComponentType.Actuator,\n [SlotRuleServiceType.THERMO_PROBE]: ComponentType.Probe,\n [SlotRuleServiceType.THERMO_THERMO]: ComponentType.Thermo,\n [SlotRuleServiceType.THERMO_HEATING_PUMPS]: ComponentType.Actuator,\n [SlotRuleServiceType.THERMO_COOLING_PUMPS]: ComponentType.Actuator,\n [SlotRuleServiceType.THERMO_SHARED_PUMPS]: ComponentType.Actuator,\n [SlotRuleServiceType.COMMANDS_AND_GROUPS]: ComponentType.Command,\n }[this.ruleServiceType] as ComponentType;\n }\n\n get currentStepAssignableThermoActuatorType() {\n return convertThermoRuleServiceTypeToThermoActuatorType(\n this.ruleServiceType\n );\n }\n}\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./DeviceAndSlotDetail.scss?vue&type=style&index=0&lang=scss\"","import { createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createBlock(\"span\", {\n class: [\"device-slot-dot\", [_ctx.slotDotClass, _ctx.slotIcon]]\n }, null, 2))\n}","import { Options } from 'vue-class-component';\nimport SlotItem from './SlotItem';\n\n@Options({\n name: 'SlotItemOverview',\n})\nexport default class SlotItemOverview extends SlotItem {}\n","import { render } from \"./SlotItemOverview.vue?vue&type=template&id=3e68f557&ts=true\"\nimport script from \"./SlotItemOverview.ts?vue&type=script&lang=ts\"\nexport * from \"./SlotItemOverview.ts?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/home/vsts/work/1/s/Frontend/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar aFunction = require('../internals/a-function');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flatMap` method\n// https://tc39.es/ecma262/#sec-array.prototype.flatmap\n$({ target: 'Array', proto: true }, {\n flatMap: function flatMap(callbackfn /* , thisArg */) {\n var O = toObject(this);\n var sourceLen = toLength(O.length);\n var A;\n aFunction(callbackfn);\n A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return A;\n }\n});\n","// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('flatMap');\n","module.exports = __webpack_public_path__ + \"img/icon-arrows-down.d33a9aed.svg\";","module.exports = __webpack_public_path__ + \"img/icon-checkbox-disabled.e73b0c58.svg\";","module.exports = __webpack_public_path__ + \"img/icon-add-circle-outline.37b9f1a7.svg\";","'use strict';\nvar isArray = require('../internals/is-array');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\n\n// `FlattenIntoArray` abstract operation\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? bind(mapper, thisArg, 3) : false;\n var element;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n if (depth > 0 && isArray(element)) {\n targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;\n } else {\n if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n};\n\nmodule.exports = flattenIntoArray;\n","'use strict';\nvar $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n","import { toDisplayString as _toDisplayString, createVNode as _createVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, renderList as _renderList, Fragment as _Fragment, vShow as _vShow, withDirectives as _withDirectives } from \"vue\"\n\nconst _hoisted_1 = { class: \"d-flex align-items-center\" }\nconst _hoisted_2 = { class: \"flex-grow-1\" }\nconst _hoisted_3 = { class: \"device-add-edit-card__title fw-bold\" }\nconst _hoisted_4 = {\n key: 0,\n class: \"device-add-edit-card__slots\"\n}\nconst _hoisted_5 = { class: \"device-add-edit-card__actions d-flex align-items-center\" }\nconst _hoisted_6 = {\n key: 0,\n class: \"channels-container\"\n}\nconst _hoisted_7 = { class: \"list-unstyled mb-0\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_DeviceSlotsListOverview = _resolveComponent(\"DeviceSlotsListOverview\")\n const _component_InlineSvgScoped = _resolveComponent(\"InlineSvgScoped\")\n const _component_Button = _resolveComponent(\"Button\")\n const _component_Card = _resolveComponent(\"Card\")\n const _component_SlotListItem = _resolveComponent(\"SlotListItem\")\n\n return (_openBlock(), _createBlock(\"div\", {\n class: [\"device-add-edit-card\", { 'is--expanded': _ctx.isExpanded }]\n }, [\n _createVNode(_component_Card, null, {\n content: _withCtx(() => [\n _createVNode(\"div\", _hoisted_1, [\n _createVNode(\"div\", _hoisted_2, [\n _createVNode(\"div\", _hoisted_3, _toDisplayString(_ctx.device.model) + \" - ID \" + _toDisplayString(_ctx.device.id), 1),\n (!_ctx.isOnlyDeviceSelection)\n ? (_openBlock(), _createBlock(\"div\", _hoisted_4, [\n _createVNode(_component_DeviceSlotsListOverview, {\n isAdd: _ctx.isAdd,\n device: _ctx.device,\n slotList: _ctx.compatibleSlots,\n linkableObject: _ctx.linkableObject,\n ruleServiceType: _ctx.ruleServiceType\n }, null, 8, [\"isAdd\", \"device\", \"slotList\", \"linkableObject\", \"ruleServiceType\"])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _createVNode(\"div\", _hoisted_5, [\n (_ctx.isAdd)\n ? (_openBlock(), _createBlock(_component_Button, {\n key: 0,\n class: \"p-button-rounded p-button-outlined py-1\",\n onClick: _ctx.addDevice\n }, {\n default: _withCtx(() => [\n (!_ctx.isSingleDeviceSelection)\n ? (_openBlock(), _createBlock(_component_InlineSvgScoped, {\n key: 0,\n src: \n require(`@/assets/images/icons/icon-add-circle-outline.svg`)\n ,\n class: \"mr-1\"\n }, null, 8, [\"src\"]))\n : _createCommentVNode(\"\", true),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t(\n !_ctx.isSingleDeviceSelection\n ? \"AppResource.Add\"\n : \"general.select\"\n )), 1)\n ]),\n _: 1\n }, 8, [\"onClick\"]))\n : (_openBlock(), _createBlock(_component_Button, {\n key: 1,\n class: \"p-button-text py-1\",\n onClick: _ctx.removeDevice\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t(\"AppResource.Remove\")), 1)\n ]),\n _: 1\n }, 8, [\"onClick\"])),\n (!_ctx.isOnlyDeviceSelection)\n ? (_openBlock(), _createBlock(_component_Button, {\n key: 2,\n class: \"p-button-text ml-2 expand-btn\",\n onClick: _ctx.toggleExpand\n }, {\n default: _withCtx(() => [\n _createVNode(_component_InlineSvgScoped, {\n src: \n require(`@/assets/images/icons/icon-arrows-down.svg`)\n \n }, null, 8, [\"src\"])\n ]),\n _: 1\n }, 8, [\"onClick\"]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ]),\n _: 1\n }),\n (!_ctx.isOnlyDeviceSelection)\n ? _withDirectives((_openBlock(), _createBlock(\"div\", _hoisted_6, [\n _createVNode(\"ul\", _hoisted_7, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.compatibleSlots, (slot) => {\n return (_openBlock(), _createBlock(_component_SlotListItem, {\n key: slot,\n objectSlot: slot,\n isAdd: _ctx.isAdd,\n device: _ctx.device,\n linkableObject: _ctx.linkableObject,\n ruleServiceType: _ctx.ruleServiceType,\n \"show-bar\": slot.showBar\n }, null, 8, [\"objectSlot\", \"isAdd\", \"device\", \"linkableObject\", \"ruleServiceType\", \"show-bar\"]))\n }), 128))\n ])\n ], 512)), [\n [_vShow, _ctx.isExpanded]\n ])\n : _createCommentVNode(\"\", true)\n ], 2))\n}","import { createVNode as _createVNode, toDisplayString as _toDisplayString, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, Fragment as _Fragment, withCtx as _withCtx } from \"vue\"\n\nconst _hoisted_1 = { class: \"ml-2\" }\nconst _hoisted_2 = { class: \"ml-auto\" }\nconst _hoisted_3 = { class: \"mr-3\" }\nconst _hoisted_4 = {\n key: 0,\n class: \"bar-mostrine\"\n}\nconst _hoisted_5 = { class: \"confirmation-content\" }\nconst _hoisted_6 = { class: \"confirmation-content\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Checkbox = _resolveComponent(\"Checkbox\")\n const _component_InlineSvgScoped = _resolveComponent(\"InlineSvgScoped\")\n const _component_Button = _resolveComponent(\"Button\")\n const _component_Dialog = _resolveComponent(\"Dialog\")\n\n return (_openBlock(), _createBlock(_Fragment, null, [\n _createVNode(\"li\", {\n class: [\"channel-row d-flex\", { 'position-relative': _ctx.showBar }]\n }, [\n _createVNode(\"div\", null, [\n _createVNode(\"span\", {\n class: [\"device-slot-dot\", [_ctx.slotDotClass, _ctx.slotIcon]]\n }, null, 2),\n _createVNode(\"span\", _hoisted_1, _toDisplayString(_ctx.slotName) + \" \" + _toDisplayString(_ctx.objectSlot.index), 1)\n ]),\n _createVNode(\"div\", _hoisted_2, [\n _createVNode(\"span\", _hoisted_3, _toDisplayString(_ctx.linkDescription), 1),\n (_ctx.isCommutable)\n ? (_openBlock(), _createBlock(_component_Checkbox, {\n key: 0,\n binary: true,\n modelValue: _ctx.isSlotSelected,\n disabled: _ctx.isAdd,\n onClick: _ctx.toggleSlot\n }, null, 8, [\"modelValue\", \"disabled\", \"onClick\"]))\n : (_openBlock(), _createBlock(_component_InlineSvgScoped, {\n key: 1,\n class: \"checkbox-fake-disabled\",\n src: \n require(`@/assets/images/icons/icon-checkbox-disabled.svg`)\n ,\n \"aria-label\": \"icon-checkbox-disabled\"\n }, null, 8, [\"src\"]))\n ]),\n (_ctx.showBar)\n ? (_openBlock(), _createBlock(\"span\", _hoisted_4))\n : _createCommentVNode(\"\", true)\n ], 2),\n (_ctx.popupData)\n ? (_openBlock(), _createBlock(_component_Dialog, {\n key: 0,\n header: _ctx.popupData.warningTitle,\n visible: _ctx.popupData.isWarningRequested,\n \"onUpdate:visible\": _cache[1] || (_cache[1] = ($event: any) => (_ctx.popupData.isWarningRequested = $event)),\n visibleModifiers: { sync: true },\n style: { width: '350px' },\n modal: true\n }, {\n footer: _withCtx(() => [\n (_ctx.popupData.isConfirmation)\n ? (_openBlock(), _createBlock(_Fragment, { key: 0 }, [\n _createVNode(_component_Button, {\n label: _ctx.$t('AppResource.No'),\n onClick: _ctx.doNoCommandBtn,\n class: \"p-button-text\"\n }, null, 8, [\"label\", \"onClick\"]),\n _createVNode(_component_Button, {\n label: _ctx.$t('AppResource.Yes'),\n onClick: _ctx.doYesCommandBtn,\n class: \"p-button-text\",\n autofocus: \"\"\n }, null, 8, [\"label\", \"onClick\"])\n ], 64))\n : (_openBlock(), _createBlock(_component_Button, {\n key: 1,\n label: _ctx.$t('AppResource.Ok'),\n onClick: _ctx.doAlertCommandBtn,\n class: \"p-button-text\",\n autofocus: \"\"\n }, null, 8, [\"label\", \"onClick\"]))\n ]),\n default: _withCtx(() => [\n _createVNode(\"div\", _hoisted_5, [\n _createVNode(\"span\", null, _toDisplayString(_ctx.popupData.warningMessage), 1)\n ])\n ]),\n _: 1\n }, 8, [\"header\", \"visible\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.popupData)\n ? (_openBlock(), _createBlock(_component_Dialog, {\n key: 1,\n header: _ctx.popupData.warningTitle,\n visible: _ctx.popupData.isPresetWarningRequested,\n \"onUpdate:visible\": _cache[2] || (_cache[2] = ($event: any) => (_ctx.popupData.isPresetWarningRequested = $event)),\n visibleModifiers: { sync: true },\n style: { width: '350px' },\n modal: true\n }, {\n footer: _withCtx(() => [\n _createVNode(_component_Button, {\n label: _ctx.$t('AppResource.No'),\n onClick: _ctx.doPresetNoCommandBtn,\n class: \"p-button-text\"\n }, null, 8, [\"label\", \"onClick\"]),\n _createVNode(_component_Button, {\n label: _ctx.$t('AppResource.Yes'),\n onClick: _ctx.doPresetYesCommandBtn,\n class: \"p-button-text\",\n autofocus: \"\"\n }, null, 8, [\"label\", \"onClick\"])\n ]),\n default: _withCtx(() => [\n _createVNode(\"div\", _hoisted_6, [\n _createVNode(\"span\", null, _toDisplayString(_ctx.popupData.warningMessage), 1)\n ])\n ]),\n _: 1\n }, 8, [\"header\", \"visible\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n}","import {\n ActuatorModalityType,\n ConfigurationType,\n Device,\n RoomObjectDTO,\n Slot,\n SlotStatus,\n ThermoActuatorType,\n RoomObjectType,\n ComponentType,\n DeviceDTO,\n SystemControlType,\n} from '@/../client-generator/generated-clients/plants';\nimport i18n from '@/core/translations/i18n';\nimport { getCurrentThermoActuatorType } from '@/core/utils/utils';\nimport {\n SlotRuleServiceType,\n WorkflowCallbackData,\n WorkflowCallbackFunction,\n} from './slots-assign-rules-interfaces';\n\n/**\n * IMPORTANT methods to override to implement business logic:\n * - onSlotMessage: entry point to check rules, called when user clicks on a slot\n * - isSlotCompatibleForUnmarking: config\n * - isSlotCompatibleForMarking: config\n * - isLimitationReached: config\n * - doYesCommand: called by the 'yes/no' popup\n * - doNoCommand: called by the 'yes/no' popup\n * - doAlertCommand: called by the 'ok' popup\n */\n\nexport default class BaseSlotRuleService {\n slotRuleServiceType: SlotRuleServiceType =\n SlotRuleServiceType.AUTOMATION_ACTUATOR;\n roomObject!: RoomObjectDTO;\n _noOfAdjacent = 0;\n _thermoActuatorType!: ThermoActuatorType;\n _modalityTypeConfiguration!: ActuatorModalityType;\n\n //this is used to communicate between ui and business logic.\n //the service decide if status could be updated directly or if an user action is required.\n //a callback is called and a popup or something appears.\n //The UI must call doYes or doNo callback provided in this callback function so the control returns here with required data\n _workflowCallback!: WorkflowCallbackFunction;\n\n readonly FourConfigurationSteps = 4;\n readonly FiveConfigurationSteps = 5;\n readonly OneElement = 1;\n readonly OneAdjacent = 1;\n readonly TwoAdjacent = 2;\n readonly ThreeAdjacent = 3;\n readonly FourAdjacent = 4;\n readonly FiveAdjacent = 5;\n readonly MaximumNoOfThermostatSlots = 9;\n readonly MaximumNoOfDeviceSlots = 8;\n readonly FourthSlot = 4;\n readonly TwoSlots = 2;\n readonly CountReset = 0;\n\n constructor(\n roomObject: RoomObjectDTO,\n noOfAdjacent: number,\n thermoActuatorType: ThermoActuatorType,\n modalityTypeConfiguration: ActuatorModalityType,\n workflowCallback: WorkflowCallbackFunction\n ) {\n this.roomObject = roomObject;\n this._noOfAdjacent = noOfAdjacent;\n this._thermoActuatorType = thermoActuatorType;\n this._modalityTypeConfiguration = modalityTypeConfiguration;\n this._workflowCallback = workflowCallback;\n }\n\n //method called when slot is clicked. This method is responsible to check current device state, and update the status of slots.\n //could be overrided to implement business logic\n onSlotMessage(device: DeviceDTO, slot: Slot) {\n switch (slot.status) {\n case SlotStatus.Configured:\n {\n if (this.isSlotLinkedWithCurrentRoomObject(slot)) {\n const data: WorkflowCallbackData = {\n warningTitle: `${i18n.global.t(\n 'AppResource.UnlinkThe'\n )} ${i18n.global.t('AppResource.Channel')}`,\n warningMessage: `${i18n.global.t(\n 'AppResource.UnlinkMessage'\n )} ${i18n.global.t('AppResource.Channel')} ${\n slot.index\n } ${i18n.global.t('AppResource.From')} ${this.roomObject.name}`,\n isConfirmation: true,\n isWarningRequested: true,\n _isUnlinkFlow: true,\n };\n this._workflowCallback(\n data,\n () => this.doYesCommand(data, device, slot),\n () => this.doNoCommand(data, device, slot)\n );\n } else {\n if (\n this.isSlotRoomObjectTypeMatchingAndNotLinked(slot) ||\n this.isSlotLinkedAsPump(slot)\n ) {\n //AS: CurrentStatus does not influence Lights\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.Configured,\n SlotStatus.MarkedForLinking\n );\n }\n }\n }\n break;\n case SlotStatus.NotConfigured:\n {\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.NotConfigured,\n SlotStatus.MarkedForLinking\n );\n\n if (device != null) {\n var tmp = device.slots?.filter((sl) =>\n this.slotHasAdjacentSlots(slot, sl)\n );\n var _adjacentSlotVm =\n tmp && tmp?.length > 0 ? tmp[tmp?.length - 1] : null;\n\n if (\n device != null &&\n device.componentTypes?.includes(ComponentType.DimmerActuator) &&\n device.canHandleDoubleDimmer &&\n _adjacentSlotVm != null\n ) {\n const data: WorkflowCallbackData = {\n warningTitle: i18n.global.t('AppResource.SingleLoadFlow'),\n warningMessage: i18n.global.t(\n 'AppResource.SingleLoadFlowMessage'\n ),\n isConfirmation: true,\n isWarningRequested: true,\n _isSingleLoadFlow: true,\n };\n this._workflowCallback(\n data,\n () => this.doYesCommand(data, device, slot),\n () => this.doNoCommand(data, device, slot)\n );\n }\n }\n }\n break;\n case SlotStatus.MarkedForLinking:\n //TODO: update mostrine status\n {\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.MarkedForLinking,\n SlotStatus.NotConfigured\n );\n }\n break;\n default:\n break;\n }\n }\n\n markOrUnmarkSlot(\n roomObject: RoomObjectDTO,\n slot: Slot,\n device: DeviceDTO,\n currentStatus: SlotStatus,\n nextStatus: SlotStatus,\n isCommandCall = false,\n isDeviceWithPairSelection = false\n ) {\n if (slot != null) {\n const tmpThermoActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n if (nextStatus == SlotStatus.MarkedForLinking) {\n //LR This is the case when HeatingAndCooling is marked for linking and we want the next Status to still be marked for linking but only cooling or heating\n if (\n (slot.status == SlotStatus.MarkedForLinking ||\n this.isSlotLinkedWithCurrentRoomObject(slot)) &&\n (this.isSlotThermoActuatorType(\n slot,\n ThermoActuatorType.HeatingAndCoolingPump\n ) ||\n this.isSlotThermoActuatorType(\n slot,\n ThermoActuatorType.HeatingAndCoolingValve\n )) &&\n (tmpThermoActuatorType == ThermoActuatorType.HeatingAndCoolingPump ||\n tmpThermoActuatorType == ThermoActuatorType.HeatingAndCoolingValve)\n ) {\n this.updateLinking(\n this.getAdjacentSlotsToUnmark(slot, device, currentStatus),\n nextStatus\n );\n } else {\n // Exception described in MXSRV-725 ------------------------\n var numOfAdjacentToSelect = this._noOfAdjacent;\n if (\n roomObject.type == RoomObjectType.Shutter &&\n device.isShutterWithPosition\n )\n numOfAdjacentToSelect = this.OneAdjacent;\n // ---------------------------------------------------------\n var adjacentSlots = this.getAdjacentSlotsToMark(\n device,\n slot,\n numOfAdjacentToSelect,\n isDeviceWithPairSelection\n );\n if (this.isLimitationReached(adjacentSlots)) {\n const data: WorkflowCallbackData = {\n warningTitle: i18n.global.t(\n 'AppResource.MaxNumberActuator_Title'\n ),\n warningMessage: i18n.global.t(\n 'AppResource.MaximumActuatorsReached'\n ),\n isConfirmation: false,\n isWarningRequested: true,\n };\n this._workflowCallback(\n data,\n () => this.doYesCommand(data, device, slot),\n () => this.doNoCommand(data, device, slot),\n () => this.doAlertCommand(data, device, slot)\n );\n } else if (numOfAdjacentToSelect <= (adjacentSlots?.length ?? 0)) {\n this.updateLinking(\n adjacentSlots?.sort((a, b) => (a.index ?? 0) - (b.index ?? 0)) ??\n null,\n nextStatus\n );\n } else {\n const data: WorkflowCallbackData = {\n warningTitle: i18n.global.t(\n 'AppResource.NotEnoughAdjacentChannelsTitle'\n ),\n warningMessage: i18n.global.t(\n 'AppResource.NotEnoughAdjacentChannelsMessage'\n ),\n isConfirmation: false,\n isWarningRequested: true,\n };\n this._workflowCallback(\n data,\n () => this.doYesCommand(data, device, slot),\n () => this.doNoCommand(data, device, slot),\n () => this.doAlertCommand(data, device, slot)\n );\n }\n }\n } else {\n this.updateLinking(\n this.getAdjacentSlotsToUnmark(slot, device, currentStatus),\n nextStatus\n );\n }\n }\n }\n\n isSlotLinkedWithCurrentRoomObject(slot: Slot) {\n return (\n slot.linkedObjects?.some((k) => k.id === this.roomObject.id) ?? false\n );\n }\n\n isSlotLinkedAsPump(slot: Slot) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n return [\n ThermoActuatorType.HeatingPump,\n ThermoActuatorType.CoolingPump,\n ThermoActuatorType.HeatingAndCoolingPump,\n ThermoActuatorType.SharedPump,\n ].includes(tmpActuatorType);\n }\n\n isSlotRoomObjectTypeMatchingAndNotLinked(slot: Slot) {\n return !this.isSlotLinkedWithCurrentRoomObject(slot);\n }\n\n updateLinking(slots: Slot[] | null, nextStatus: SlotStatus) {\n if (slots != null) {\n var isHeatingAndCoolingPresent = slots.some((s) =>\n this.isSlotThermoActuatorType(\n s,\n ThermoActuatorType.HeatingAndCoolingValve\n )\n );\n for (var slot of slots) {\n if (slot != null) {\n if (\n isHeatingAndCoolingPresent &&\n !this.isSlotThermoActuatorType(\n slot,\n ThermoActuatorType.HeatingAndCoolingValve\n )\n ) {\n //LR Because when selecting multiple slots there may be only heating, only cooling or heating and cooling and there are different steps for these cases\n this.removeOrUpdateSlot(slot);\n } else if (\n this.isSlotThermoActuatorType(\n slot,\n ThermoActuatorType.HeatingAndCoolingPump\n ) ||\n this.isSlotThermoActuatorType(\n slot,\n ThermoActuatorType.HeatingAndCoolingValve\n )\n ) {\n //LR because we don't want to remove from Param just change to cooling or heating\n this.updateForSlotChanging(slot);\n } else if (nextStatus == SlotStatus.MarkedForLinking) {\n this.addOrUpdateSlot(slot, this._thermoActuatorType);\n } else {\n this.removeOrUpdateSlot(slot);\n }\n }\n }\n }\n }\n\n removeOrUpdateSlot(slotViewModel: Slot) {\n if (this.roomObject?.devices != null && slotViewModel != null) {\n this.addSlotThermoActuatorType(slotViewModel, ThermoActuatorType.None);\n slotViewModel.modalityTypeConfiguration = ActuatorModalityType.None;\n slotViewModel.configurationType = ConfigurationType.None;\n slotViewModel.status = SlotStatus.NotConfigured; //LR make changes before Status is changed because RaisePropertyChanged is on Status\n }\n }\n\n updateForSlotChanging(slotViewModel: Slot) {}\n\n isSlotThermoActuatorType(\n slotViewModel: Slot,\n thermoActuatorType: ThermoActuatorType\n ) {\n if (!slotViewModel.thermoActuatorTypes) return false;\n if (!this.roomObject.id) return false;\n return (\n slotViewModel.thermoActuatorTypes[this.roomObject.id] ==\n thermoActuatorType\n );\n }\n\n addSlotThermoActuatorType(\n slotViewModel: Slot,\n thermoActuatorType: ThermoActuatorType\n ) {\n if (!slotViewModel.thermoActuatorTypes)\n slotViewModel.thermoActuatorTypes = {};\n if (this.roomObject.id) {\n slotViewModel.thermoActuatorTypes[\n this.roomObject.id\n ] = thermoActuatorType;\n }\n }\n\n addOrUpdateSlot(\n slotViewModel: Slot,\n thermoActuatorType = ThermoActuatorType.None\n ) {\n if (this.roomObject?.devices != null && slotViewModel != null) {\n slotViewModel.modalityTypeConfiguration = this._modalityTypeConfiguration;\n this.addSlotThermoActuatorType(slotViewModel, thermoActuatorType);\n slotViewModel.status = SlotStatus.MarkedForLinking; //LR make changes before Status is changed because RaisePropertyChanged is on Status\n switch (this.slotRuleServiceType) {\n case SlotRuleServiceType.AUTOMATION_ACTUATOR:\n slotViewModel.assignedComponentType = ComponentType.Actuator;\n break;\n case SlotRuleServiceType.AUTOMATION_COMMAND:\n slotViewModel.assignedComponentType = ComponentType.Command;\n break;\n }\n }\n }\n\n getAdjacentSlotsToUnmark(\n slot: Slot,\n device: DeviceDTO,\n currentStatus: SlotStatus\n ) {\n if (slot != null && device?.slots != null) {\n var countLinked = 0;\n var isSelectedInAdjacent = false;\n var slotList: Slot[] = [];\n if (this._noOfAdjacent == this.OneAdjacent) {\n slotList.push(slot);\n return slotList;\n }\n var selectedSlotIndex = device.slots.indexOf(slot);\n var expandedComponentCount = device.slots.length;\n\n if (\n this.roomObject.type == RoomObjectType.Shutter &&\n device.isShutterWithPosition &&\n expandedComponentCount < this.TwoSlots\n ) {\n slotList.push(slot);\n return slotList;\n }\n\n if (\n this._noOfAdjacent == this.TwoAdjacent &&\n expandedComponentCount >= this.TwoSlots\n ) {\n if (selectedSlotIndex == 0) {\n slotList.push(device.slots[0]);\n slotList.push(device.slots[1]);\n return slotList;\n }\n if (selectedSlotIndex == expandedComponentCount) {\n //L.R. If last item is selected, unamrk last 2 items\n slotList.push(device.slots[selectedSlotIndex - 1]);\n slotList.push(device.slots[selectedSlotIndex]);\n return slotList;\n }\n for (\n var i = selectedSlotIndex - 1;\n i >= 0;\n i-- //L.R loop used to count slots to know if need to unmark previous or next with the selected slot\n ) {\n if (device.slots[i].status == currentStatus) {\n if (\n (currentStatus == SlotStatus.MarkedForLinking ||\n this.isSlotLinkedWithCurrentRoomObject(device.slots[i])) &&\n this.isSlotCompatibleForUnmarking(device.slots[i])\n ) {\n countLinked++;\n }\n } else {\n break;\n }\n }\n\n slotList.push(device.slots[selectedSlotIndex]);\n\n if (countLinked % this._noOfAdjacent != 0) {\n //L.R. if true unmark the before slot. If not, unmark the next slot\n slotList.push(device.slots[selectedSlotIndex - 1]);\n return slotList;\n }\n\n slotList.push(device.slots[selectedSlotIndex + 1]);\n return slotList;\n }\n if (\n this._noOfAdjacent == this.ThreeAdjacent ||\n this._noOfAdjacent == this.FourAdjacent ||\n this._noOfAdjacent == this.FiveAdjacent\n ) {\n //L.R. If there are 8 slots and if all the slots are marked\n if (\n expandedComponentCount == this.MaximumNoOfDeviceSlots &&\n this.MaximumNoOfDeviceSlots ==\n device.slots.filter(\n (s) =>\n s != null &&\n s.status == currentStatus &&\n (this.isSlotLinkedWithCurrentRoomObject(s) ||\n currentStatus != SlotStatus.Configured) &&\n JSON.stringify(s.thermoActuatorTypes) ===\n JSON.stringify(slot.thermoActuatorTypes)\n ).length\n ) {\n //LR the condition does not effect Lights or shutters because None == None and this condition is for the heating, cooling and HeatingAndCooling\n if (slot.index != undefined && slot.index <= this.FourthSlot) {\n //L.R. if selected is in the first half, remove the first half, else the second half\n for (var i = 0; i < this.FourthSlot; i++) {\n slotList.push(device.slots[i]);\n }\n return slotList;\n }\n for (var i = expandedComponentCount - 1; i >= this.FourthSlot; i--) {\n slotList.push(device.slots[i]);\n }\n return slotList;\n }\n\n for (var i = expandedComponentCount - 1; i >= 0; i--) {\n if (\n device.slots[i] != null &&\n device.slots[i].status == currentStatus\n ) {\n if (device.slots[i].id === slot.id) {\n isSelectedInAdjacent = true;\n }\n if (\n currentStatus == SlotStatus.Configured &&\n this.isSlotLinkedWithCurrentRoomObject(device.slots[i]) &&\n this.isSlotCompatibleForUnmarking(device.slots[i])\n ) {\n //LR This may not work for shutters if there is a light in between or other cases\n slotList.push(device.slots[i]);\n } else if (\n currentStatus == SlotStatus.MarkedForLinking &&\n this.isSlotCompatibleForUnmarking(device.slots[i])\n ) {\n slotList.push(device.slots[i]);\n }\n if (slotList.length == this._noOfAdjacent) {\n if (isSelectedInAdjacent) {\n return slotList;\n }\n slotList.shift(); //L.R. because the number of slots that are going to be marked is already reached and to not add more in the list//\n }\n }\n }\n return slotList;\n }\n }\n return null;\n }\n\n getAdjacentSlotsToMark(\n device: DeviceDTO | null,\n _selectedSlotVm: Slot | null,\n numOfAdjacentToSelect: number,\n fixedCouple = false\n ) {\n if (device?.slots != null && _selectedSlotVm != null) {\n var isSelectedInAdjacent = false;\n var slotList: Slot[] = [];\n for (\n var i = device.slots.length - 1;\n i >= 0;\n i-- //L.R. for loop needs to go backwards because the markings needs to go from the one selected to the next one so it will stop when it will reach the selected slot\n ) {\n if (device.slots[i] != null && !device.slots[i].isSetting) {\n switch (device.slots[i].status) {\n case SlotStatus.NotConfigured:\n {\n slotList.push(device.slots[i]);\n if (device.slots[i].id === _selectedSlotVm.id) {\n isSelectedInAdjacent = true;\n }\n if (slotList.length == numOfAdjacentToSelect) {\n if (isSelectedInAdjacent) {\n if (fixedCouple && i % 2 == 1) {\n // MXSRV-1797: the property fixedCouple is used when slots need to be arranged in fixed couples 1&2, 3&4, 5&6, and so on\n // MXSRV-1797: the first iteration when isSelectedInAdjacent == true means that we reached the selected slot,\n slotList.shift(); // MXSRV-1797: IF i is odd > was selected an even slot number (ex. n.4) > we HAVE to select the previous slot (n.3) and so we discard the first item from slotList which (now) is the slot that follows the selected slot\n continue; // MXSRV-1797: OTHERWISE if i is even > we selected an odd slot (ex. n.5), so we can select the following slot (n.6)\n }\n return slotList;\n }\n slotList.shift(); //L.R. because the number of slots that are going to be marked is already reached and to not add more in the list\n } else if (fixedCouple && isSelectedInAdjacent && i % 2 == 0) {\n // MXSRV-1797: if i'm already in the slot selected, if I'm in an odd slot (es.7) I cannot go back and try to select the previous\n return slotList;\n }\n }\n break;\n case SlotStatus.Configured:\n case SlotStatus.MarkedForLinking:\n {\n if (this.isSlotCompatibleForMarking(device.slots[i])) {\n slotList.push(device.slots[i]);\n if (device.slots[i].id === _selectedSlotVm.id) {\n isSelectedInAdjacent = true;\n }\n if (slotList.length == numOfAdjacentToSelect) {\n if (isSelectedInAdjacent) {\n return slotList;\n }\n slotList.shift(); //L.R. because the number of slots that are going to be marked is already reached and to not add more in the list\n }\n } else {\n slotList = [];\n isSelectedInAdjacent = false;\n }\n }\n break;\n case SlotStatus.NotUsed:\n {\n slotList = [];\n isSelectedInAdjacent = false;\n }\n break;\n }\n }\n }\n }\n return null;\n }\n\n updateMostrineStatus(\n selectedSlotViewModel: Slot,\n adjacentSlotViewModel: Slot,\n configurationType: ConfigurationType\n ) {\n if (selectedSlotViewModel != null) {\n selectedSlotViewModel.configurationType = configurationType;\n }\n if (adjacentSlotViewModel != null) {\n adjacentSlotViewModel.configurationType = configurationType;\n }\n }\n\n //could be overrided to implement business logic\n isSlotCompatibleForUnmarking(slot: Slot) {\n return true;\n }\n\n //could be overrided to implement business logic\n isSlotCompatibleForMarking(slot: Slot) {\n return false;\n }\n\n //could be overrided to implement business logic\n isLimitationReached(slot: Slot[] | null) {\n return false;\n }\n\n //could be overrided to implement business logic\n doYesCommand(data: WorkflowCallbackData, device: DeviceDTO, slot: Slot) {\n if (data._isUnlinkFlow && slot != null) {\n var isHeatingAndCooling =\n this.isSlotThermoActuatorType(\n slot,\n ThermoActuatorType.HeatingAndCoolingPump\n ) ||\n this.isSlotThermoActuatorType(\n slot,\n ThermoActuatorType.HeatingAndCoolingValve\n );\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.Configured,\n isHeatingAndCooling\n ? SlotStatus.MarkedForLinking\n : SlotStatus.NotConfigured,\n true\n );\n } else if (data._isSingleLoadFlow && slot != null) {\n if (device != null) {\n device.isDoubleDimmer = true;\n\n const tmp = device.slots?.filter((sl) =>\n this.slotHasAdjacentSlots(slot, sl)\n );\n const _adjacentSlotVm = tmp ? tmp[tmp.length - 1] : null;\n\n if (_adjacentSlotVm != null) {\n this.updateMostrineStatus(\n slot,\n _adjacentSlotVm,\n ConfigurationType.Mostrine\n );\n }\n }\n }\n }\n\n //could be overrided to implement business logic\n doNoCommand(data: WorkflowCallbackData, device: DeviceDTO, slot: Slot) {\n if (data._isSingleLoadFlow && slot != null) {\n if (device != null) {\n device.isDoubleDimmer = false;\n }\n }\n }\n\n //could be overrided to implement business logic\n doAlertCommand(data: WorkflowCallbackData, device: DeviceDTO, slot: Slot) {\n //empty for now\n }\n\n getNoOfAdjacentSlots(systemControlType: SystemControlType): number {\n switch (systemControlType) {\n case SystemControlType.OneOnOffValve:\n case SystemControlType.TwoTubesProportionalValve:\n case SystemControlType.TwoTubesProportionalSpeedControlValve:\n case SystemControlType.FourTubesProportionalValve:\n case SystemControlType.FourTubesProportionalSpeedControlValve: {\n return this.OneAdjacent;\n }\n case SystemControlType.OneOpenCloseValve:\n case SystemControlType.OneProportionalValve: {\n return this.TwoAdjacent;\n }\n case SystemControlType.TwoTubesOnOffValve: {\n return this.FourAdjacent;\n }\n case SystemControlType.FourTubesOnOffValve: {\n return this.FiveAdjacent;\n }\n default: {\n return this.OneAdjacent;\n }\n }\n }\n\n getCurrentThermoActuatorType(\n thermoActuatorTypes: { [key: string]: ThermoActuatorType } | undefined,\n roomObjectId: string | undefined\n ): ThermoActuatorType {\n return getCurrentThermoActuatorType(thermoActuatorTypes, roomObjectId);\n }\n\n slotHasAdjacentSlots(slot: Slot, sl: Slot) {\n return (\n sl != null &&\n sl.configurationType != ConfigurationType.None &&\n !sl.isSetting &&\n (sl.index == (slot.index ?? 0) + 1 ||\n sl.index == (slot.index ?? 0) - 1) &&\n (sl.status == SlotStatus.MarkedForLinking ||\n sl.status == SlotStatus.MarkedAdjacent ||\n (sl.status == SlotStatus.Configured &&\n this.isSlotLinkedWithCurrentRoomObject(sl)))\n );\n }\n}\n","import {\n ActuatorModalityType,\n ConfigurationType,\n RoomObjectDTO,\n Slot,\n SlotStatus,\n ThermoActuatorType,\n RoomObjectType,\n ComponentType,\n DeviceDTO,\n} from '@/../client-generator/generated-clients/plants';\nimport i18n from '../../translations/i18n';\nimport {\n SlotRuleServiceType,\n WorkflowCallbackData,\n WorkflowCallbackFunction,\n} from './slots-assign-rules-interfaces';\nimport BaseSlotRuleService from './slots-assign-rules-service';\n\nexport default class AssignAutomationActuatorSlotRuleService extends BaseSlotRuleService {\n constructor(\n roomObject: RoomObjectDTO,\n workflowCallback: WorkflowCallbackFunction\n ) {\n super(\n roomObject,\n -1,\n ThermoActuatorType.None,\n ActuatorModalityType.None,\n workflowCallback\n );\n this.slotRuleServiceType = SlotRuleServiceType.AUTOMATION_ACTUATOR;\n\n if (roomObject.type == RoomObjectType.Blind) {\n this._noOfAdjacent = this.FourAdjacent;\n } else {\n this._noOfAdjacent =\n roomObject.type == RoomObjectType.Shutter\n ? this.TwoAdjacent\n : this.OneAdjacent;\n }\n }\n\n onSlotMessage(device: DeviceDTO, slot: Slot) {\n switch (slot.status) {\n case SlotStatus.Configured:\n {\n if (this.isSlotLinkedWithCurrentRoomObject(slot)) {\n const data: WorkflowCallbackData = {\n warningTitle: `${i18n.global.t(\n 'AppResource.UnlinkThe'\n )} ${i18n.global.t('AppResource.Channel')}`,\n warningMessage: `${i18n.global.t(\n 'AppResource.UnlinkMessage'\n )} ${i18n.global.t('AppResource.Channel')} ${\n slot.index\n } ${i18n.global.t('AppResource.From')} ${this.roomObject.name}`,\n isConfirmation: true,\n isWarningRequested: true,\n _isUnlinkFlow: true,\n };\n this._workflowCallback(\n data,\n () => this.doYesCommand(data, device, slot),\n () => this.doNoCommand(data, device, slot)\n );\n } else {\n if (\n this.isSlotRoomObjectTypeMatchingAndNotLinked(slot) ||\n this.isSlotLinkedAsPump(slot)\n ) {\n //AS: CurrentStatus does not influence Lights\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.Configured,\n SlotStatus.MarkedForLinking\n );\n //}\n }\n }\n }\n break;\n case SlotStatus.NotConfigured:\n {\n if (device != null) {\n var tmp = device.slots?.filter((sl) =>\n this.slotHasAdjacentSlots(slot, sl)\n );\n var _adjacentSlotVm =\n tmp && tmp?.length > 0 ? tmp[tmp?.length - 1] : null;\n\n if (\n device != null &&\n device.componentTypes?.includes(ComponentType.DimmerActuator) &&\n device.canHandleDoubleDimmer &&\n _adjacentSlotVm != null\n ) {\n const data: WorkflowCallbackData = {\n warningTitle: i18n.global.t('AppResource.SingleLoadFlow'),\n warningMessage: i18n.global.t(\n 'AppResource.SingleLoadFlowMessage'\n ),\n isConfirmation: true,\n isWarningRequested: true,\n _isSingleLoadFlow: true,\n };\n this._workflowCallback(\n data,\n () => this.doYesCommand(data, device, slot),\n () => this.doNoCommand(data, device, slot)\n );\n } else {\n if (this.roomObject.devices) {\n for (var _device of this.roomObject.devices) {\n if (_device.slots) {\n for (var _slotList of _device.slots) {\n if (\n _slotList.status == SlotStatus.MarkedForLinking &&\n (_slotList.assignedComponentType ==\n ComponentType.Actuator ||\n _slotList.assignedComponentType ==\n ComponentType.BlindActuator ||\n _slotList.assignedComponentType ==\n ComponentType.ShutterActuator ||\n _slotList.assignedComponentType ==\n ComponentType.DimmerActuator)\n ) {\n if (_slotList != slot) {\n this.markOrUnmarkSlot(\n this.roomObject,\n _slotList,\n _device,\n SlotStatus.MarkedForLinking,\n SlotStatus.NotConfigured\n );\n }\n }\n }\n }\n }\n }\n }\n }\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.NotConfigured,\n SlotStatus.MarkedForLinking\n );\n }\n break;\n case SlotStatus.MarkedForLinking:\n {\n //slot.status = SlotStatus.NotConfigured;\n\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.MarkedForLinking,\n SlotStatus.NotConfigured\n );\n }\n break;\n case SlotStatus.NotUsed:\n default:\n break;\n }\n }\n\n isSlotCompatibleForMarking(slot: Slot) {\n return (\n this.isSlotRoomObjectTypeMatchingAndNotLinked(slot) &&\n slot.status != SlotStatus.MarkedForLinking\n );\n }\n\n doNoCommand(data: WorkflowCallbackData, device: DeviceDTO, slot: Slot) {\n if (data._isSingleLoadFlow && slot != null) {\n if (device != null) {\n device.isDoubleDimmer = false;\n\n if (this.roomObject.devices) {\n for (var _device of this.roomObject.devices) {\n if (_device.slots) {\n for (var _slotList of _device.slots) {\n if (\n _slotList.assignedComponentType == ComponentType.Actuator ||\n _slotList.assignedComponentType ==\n ComponentType.BlindActuator ||\n _slotList.assignedComponentType ==\n ComponentType.ShutterActuator ||\n _slotList.assignedComponentType ==\n ComponentType.DimmerActuator\n ) {\n if (_slotList != slot) {\n this.markOrUnmarkSlot(\n this.roomObject,\n _slotList,\n _device,\n SlotStatus.MarkedForLinking,\n SlotStatus.NotConfigured\n );\n }\n }\n }\n }\n }\n }\n }\n }\n }\n}\n","export default class MxConstants {\n //Actuator Models\n static F43002 = 'F430/2';\n static F43004 = 'F430/4';\n static F430R8 = 'F430R8';\n static F430R3V10 = 'F430R3V10';\n static F430V10 = 'F430V10';\n static F401 = 'F401'; //LR used for Preset\n static K8002S = 'K8002S'; //LR used for Preset\n static H4661M2 = 'H4661M2'; //LR used for Preset\n static K4672M2S = 'K4672M2S'; //LR used for Preset, also model used with commands\n\n //Command Models\n static K4652M2 = 'K4652M2'; //LR used for Preset\n static K4652M3 = 'K4652M3'; //LR used for Preset\n static F428 = 'F428';\n static H4652_3 = 'H4652/3';\n\n //Thermostat Models\n static ModelBT3454 = 'BT-3454';\n static ModelKG4691 = 'KG4691';\n static ModelKW4691 = 'KW4691';\n static ModelLN4691 = 'LN4691';\n static Model067459 = '067459';\n static Model64170 = '64170';\n}\n","import { Device } from '@/../client-generator/generated-clients/plants';\nimport ProtocolConstants from './protocol-constants';\n\n/**\n * Defines the device groups which are used in rules\n * In the future this may come from an API\n */\nclass SlotsConfigService {\n static deviceConstants = {\n '8BtnDeviceOrCrystalDeviceWithPairSelection': [\n ProtocolConstants.Device1_3_49,\n ProtocolConstants.Device1_1_49,\n ProtocolConstants.Device2_4_49,\n ProtocolConstants.Device2_2_17,\n ProtocolConstants.Device2_4_17,\n ProtocolConstants.Device1_3_27,\n ProtocolConstants.Device2_2_27,\n ProtocolConstants.Device1_3_28,\n ],\n automationCommandsSpecialDevices: [ProtocolConstants.Device1_5_119],\n isDevice15117orDevice15121orDevice15119: [\n ProtocolConstants.Device1_5_117,\n ProtocolConstants.Device1_5_121,\n ProtocolConstants.Device1_5_119,\n ProtocolConstants.Device0_0_121,\n ],\n isDevice3477: [\n ProtocolConstants.Device1_0_152,\n ProtocolConstants.Device2_2_152,\n ],\n isDeviceF428: [\n ProtocolConstants.Device1_0_149,\n ProtocolConstants.Device2_0_149,\n ],\n isDeviceCrystal8Scene: [\n ProtocolConstants.Device2_2_17,\n ProtocolConstants.Device2_4_17,\n ProtocolConstants.Device1_3_27,\n ProtocolConstants.Device2_2_27,\n ProtocolConstants.Device1_3_28,\n ProtocolConstants.Device1_3_49,\n ProtocolConstants.Device1_1_49,\n ProtocolConstants.Device2_4_49,\n ],\n };\n\n static is8BtnDeviceOrCrystalDeviceWithPairSelection = function (\n device?: Device\n ) {\n return (\n device &&\n device.modelObject &&\n SlotsConfigService.deviceConstants[\n '8BtnDeviceOrCrystalDeviceWithPairSelection'\n ].includes(device.modelObject)\n );\n };\n\n static automationCommandsSpecialDevices = function (device?: Device) {\n return (\n device &&\n device.modelObject &&\n SlotsConfigService.deviceConstants[\n 'automationCommandsSpecialDevices'\n ].includes(device.modelObject)\n );\n };\n\n static isDevice15117orDevice15121orDevice15119 = function (device?: Device) {\n return (\n device &&\n device.modelObject &&\n SlotsConfigService.deviceConstants[\n 'isDevice15117orDevice15121orDevice15119'\n ].includes(device.modelObject)\n );\n };\n\n static isDevice3477 = function (device?: Device) {\n return (\n device &&\n device.modelObject &&\n SlotsConfigService.deviceConstants['isDevice3477'].includes(\n device.modelObject\n )\n );\n };\n\n static isDeviceF428 = function (device?: Device) {\n return (\n device &&\n device.modelObject &&\n SlotsConfigService.deviceConstants['isDeviceF428'].includes(\n device.modelObject\n )\n );\n };\n\n static isDeviceCrystal8Scene = function (device?: Device) {\n return (\n device &&\n device.modelObject &&\n SlotsConfigService.deviceConstants['isDeviceCrystal8Scene'].includes(\n device.modelObject\n )\n );\n };\n}\n\nexport default SlotsConfigService;\n","import {\n ActuatorModalityType,\n ConfigurationType,\n Device,\n RoomObjectDTO,\n Slot,\n SlotStatus,\n ThermoActuatorType,\n RoomObjectType,\n ComponentType,\n DeviceDTO,\n LightType,\n FunctionType,\n} from '@/../client-generator/generated-clients/plants';\nimport i18n from '../../translations/i18n';\nimport MxConstants from './mx-constants';\nimport SlotsConfigService from './slots-assign-rules-config';\nimport {\n SlotRuleServiceType,\n WorkflowCallbackData,\n WorkflowCallbackFunction,\n} from './slots-assign-rules-interfaces';\nimport BaseSlotRuleService from './slots-assign-rules-service';\n\nexport default class AssignAutomationCommandsSlotRuleService extends BaseSlotRuleService {\n _adjacentSlotVm: Slot | null = null;\n\n constructor(\n roomObject: RoomObjectDTO,\n workflowCallback: WorkflowCallbackFunction\n ) {\n super(\n roomObject,\n -1,\n ThermoActuatorType.None,\n ActuatorModalityType.None,\n workflowCallback\n );\n this.slotRuleServiceType = SlotRuleServiceType.AUTOMATION_COMMAND;\n\n this._noOfAdjacent = this.OneAdjacent;\n }\n\n onSlotMessage(device: DeviceDTO, slot: Slot) {\n const is8BtnDeviceOrCrystalDeviceWithPairSelection = SlotsConfigService.is8BtnDeviceOrCrystalDeviceWithPairSelection(\n device\n );\n\n switch (slot.status) {\n case SlotStatus.Configured:\n {\n if (this.isSlotLinkedWithCurrentRoomObject(slot)) {\n const data: WorkflowCallbackData = {\n warningTitle: `${i18n.global.t(\n 'AppResource.UnlinkThe'\n )} ${i18n.global.t('AppResource.Module')}`,\n warningMessage: `${i18n.global.t(\n 'AppResource.UnlinkMessage'\n )} ${i18n.global.t('AppResource.Module')} ${\n slot.index\n } ${i18n.global.t('AppResource.From')} ${this.roomObject.name}`,\n _adjacentSlotVm: device.slots?.filter(\n (sl) =>\n this.slotHasAdjacentSlots(slot, sl) &&\n sl.assignedComponentType == ComponentType.Actuator\n )[0],\n _isUnlinkFlow: true,\n isWarningRequested: true,\n isConfirmation: true,\n };\n this._workflowCallback(\n data,\n () => this.doYesCommand(data, device, slot),\n () => this.doNoCommand(data, device, slot)\n );\n }\n }\n break;\n case SlotStatus.NotConfigured:\n {\n if (\n SlotsConfigService.automationCommandsSpecialDevices(device) &&\n (this.roomObject.type == RoomObjectType.Shutter ||\n this.roomObject.type == RoomObjectType.Blind ||\n this.roomObject.lightType == LightType.Dimmer)\n ) {\n this._noOfAdjacent = this.ThreeAdjacent;\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.NotConfigured,\n SlotStatus.MarkedForLinking\n );\n } else if (\n (this.roomObject.type == RoomObjectType.Shutter &&\n is8BtnDeviceOrCrystalDeviceWithPairSelection) ||\n (this.roomObject.type == RoomObjectType.Blind &&\n is8BtnDeviceOrCrystalDeviceWithPairSelection)\n ) {\n this._noOfAdjacent = this.TwoAdjacent;\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.NotConfigured,\n SlotStatus.MarkedForLinking,\n false,\n true\n );\n } else {\n this._noOfAdjacent = this.OneAdjacent;\n\n const tmp = device.slots?.filter(\n (sl) =>\n this.slotHasAdjacentSlots(slot, sl) &&\n sl.assignedComponentType == ComponentType.Command\n );\n\n this._adjacentSlotVm = tmp ? tmp[tmp.length - 1] : null;\n\n const isDevice15117orDevice15121orDevice15119 = SlotsConfigService.isDevice15117orDevice15121orDevice15119(\n device\n );\n\n // MXSRV-1841\n const isDevice3477 = SlotsConfigService.isDevice3477(device);\n\n // MXSRV-1875\n const isDeviceF428 = SlotsConfigService.isDeviceF428(device);\n\n //MXSRV-1876\n const isDeviceCrystal8Scene = SlotsConfigService.isDeviceCrystal8Scene(\n device\n );\n\n if (\n this._adjacentSlotVm != null &&\n !isDevice15117orDevice15121orDevice15119 &&\n !isDevice3477 &&\n !isDeviceF428 &&\n !isDeviceCrystal8Scene\n ) {\n const data: WorkflowCallbackData = {\n warningTitle: i18n.global.t(\n 'AppResource.MostrineQuestionTitle'\n ),\n warningMessage: i18n.global.t('AppResource.MostrineQuestion'),\n _isMostrineFlow: true,\n isWarningRequested: true,\n isConfirmation: true,\n };\n this._workflowCallback(\n data,\n () => this.doYesCommand(data, device, slot),\n () => this.doNoCommand(data, device, slot)\n );\n } else {\n if (this.isSpecialDeviceF428(slot, device)) {\n //LR if true, there is only one slot left in device with model: F428\n const adjacentSlotVm = device.slots?.filter(\n (sl) =>\n sl.status == SlotStatus.NotConfigured &&\n (sl.index == (slot.index ?? 0) + 1 ||\n sl.index == (slot.index ?? 0) - 1)\n )[0];\n if (adjacentSlotVm != null) {\n this.addOrUpdateSlot(slot);\n this.addOrUpdateSlot(adjacentSlotVm);\n this.updateConfigurationType(\n slot,\n adjacentSlotVm,\n ConfigurationType.None\n );\n } else {\n const data: WorkflowCallbackData = {\n warningTitle: i18n.global.t(\n 'AppResource.NotEnoughAdjacentChannelsTitle'\n ),\n warningMessage: i18n.global.t(\n 'AppResource.NotEnoughAdjacentChannelsMessage'\n ),\n isConfirmation: false,\n isWarningRequested: true,\n };\n this._workflowCallback(\n data,\n () => this.doYesCommand(data, device, slot),\n () => this.doNoCommand(data, device, slot),\n () => this.doAlertCommand(data, device, slot)\n );\n }\n } else {\n this.addOrUpdateSlot(slot);\n }\n }\n }\n }\n break;\n case SlotStatus.MarkedForLinking:\n {\n if (\n SlotsConfigService.automationCommandsSpecialDevices(device) &&\n (this.roomObject.type == RoomObjectType.Shutter ||\n this.roomObject.type == RoomObjectType.Blind ||\n this.roomObject.lightType == LightType.Dimmer)\n ) {\n this._noOfAdjacent = this.ThreeAdjacent;\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.MarkedForLinking,\n SlotStatus.NotConfigured\n );\n } else if (\n (this.roomObject.type == RoomObjectType.Shutter &&\n is8BtnDeviceOrCrystalDeviceWithPairSelection) ||\n (this.roomObject.type == RoomObjectType.Blind &&\n is8BtnDeviceOrCrystalDeviceWithPairSelection)\n ) {\n this._noOfAdjacent = this.TwoAdjacent;\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.MarkedForLinking,\n SlotStatus.NotConfigured\n );\n } else {\n this._noOfAdjacent = this.OneAdjacent;\n slot.status = SlotStatus.NotConfigured;\n this._adjacentSlotVm =\n device.slots?.filter((sl) =>\n this.slotHasAdjacentSlots(slot, sl)\n )[0] ?? null;\n if (slot.configurationType != ConfigurationType.None) {\n this.updateConfigurationType(\n slot,\n this._adjacentSlotVm,\n ConfigurationType.None\n );\n }\n this.removeOrUpdateSlot(slot);\n if (\n this.isSpecialDeviceF428(slot, device) &&\n this._adjacentSlotVm\n ) {\n this.removeOrUpdateSlot(this._adjacentSlotVm);\n }\n }\n }\n break;\n case SlotStatus.NotUsed:\n default:\n break;\n }\n }\n\n isSpecialDeviceF428(slot: Slot, device: Device) {\n if (slot != null && this.roomObject?.type == RoomObjectType.Shutter) {\n if (device != null && device.model == MxConstants.F428) {\n return true;\n }\n }\n\n return false;\n }\n\n updateConfigurationType(\n selectedSlotViewModel: Slot | null,\n adjacentSlotViewModel: Slot | null,\n configurationType: ConfigurationType\n ) {\n if (selectedSlotViewModel != null) {\n selectedSlotViewModel.configurationType = configurationType;\n }\n if (adjacentSlotViewModel != null) {\n adjacentSlotViewModel.configurationType = configurationType;\n }\n }\n\n areSlotsCompatibleForPresetManagement(device: DeviceDTO) {\n if (this.roomObject?.devices != null && device != null) {\n const isShutterRoomObject =\n this.roomObject.type == RoomObjectType.Shutter;\n const isActuatorModelCorrect = this.roomObject.devices.some((d) =>\n this.isActuatorModelCorrect(d)\n );\n const isLastComponentCollapsed = !!device.model;\n const commandCanHandlePreset = this.hasCommandThatCanHandlePreset(device);\n\n return (\n isShutterRoomObject &&\n isActuatorModelCorrect &&\n isLastComponentCollapsed &&\n commandCanHandlePreset\n );\n }\n return false;\n }\n\n isActuatorModelCorrect(d: DeviceDTO) {\n const deviceHasCorrectFunctionType =\n d.functionType == FunctionType.All ||\n d.functionType == FunctionType.Automation;\n const devicheHasModel = !!d.model;\n const deviceIsActuatorWithAbailableSlots =\n d.slots != null &&\n d.slots.some(\n (s) =>\n (s.status == SlotStatus.MarkedForLinking ||\n s.status == SlotStatus.Configured) &&\n (s.assignedComponentType == ComponentType.Actuator ||\n s.assignedComponentType == ComponentType.None)\n );\n\n return (\n deviceHasCorrectFunctionType &&\n devicheHasModel &&\n d.isShutterWithPosition &&\n deviceIsActuatorWithAbailableSlots\n );\n }\n\n hasCommandThatCanHandlePreset(device: DeviceDTO) {\n return device?.canHandlePreset ?? false;\n }\n\n doNoCommand(data: WorkflowCallbackData, device: DeviceDTO, slot: Slot) {\n super.doNoCommand(data, device, slot);\n if (data._isMostrineFlow) {\n if (this.areSlotsCompatibleForPresetManagement(device)) {\n const data: WorkflowCallbackData = {\n isPresetWarningRequested: true,\n _isMostrineFlow: false,\n };\n this._workflowCallback(\n data,\n () => this.doPresetYesCommand(data, device, slot),\n () => this.doPresetNoCommand(data, device, slot)\n );\n } else {\n this.addOrUpdateSlot(slot);\n }\n }\n }\n\n doYesCommand(data: WorkflowCallbackData, device: DeviceDTO, slot: Slot) {\n if (slot != null) {\n if (data._isUnlinkFlow) {\n if (\n slot.configurationType != ConfigurationType.None &&\n this._adjacentSlotVm != null\n ) {\n this.updateConfigurationType(\n slot,\n this._adjacentSlotVm,\n ConfigurationType.None\n );\n }\n this.removeOrUpdateSlot(slot);\n if (this.isSpecialDeviceF428(slot, device) && this._adjacentSlotVm) {\n this.removeOrUpdateSlot(this._adjacentSlotVm);\n }\n } else if (data._isMostrineFlow) {\n this.addOrUpdateSlot(slot);\n this.updateConfigurationType(\n slot,\n this._adjacentSlotVm,\n ConfigurationType.Mostrine\n );\n }\n }\n }\n\n doPresetNoCommand(data: WorkflowCallbackData, device: DeviceDTO, slot: Slot) {\n this.addOrUpdateSlot(slot);\n }\n\n doPresetYesCommand(\n data: WorkflowCallbackData,\n device: DeviceDTO,\n slot: Slot\n ) {\n this.addOrUpdateSlot(slot);\n this.updateConfigurationType(\n slot,\n this._adjacentSlotVm,\n ConfigurationType.Preset\n );\n }\n}\n","import {\n ActuatorModalityType,\n ConfigurationType,\n Device,\n RoomObjectDTO,\n Slot,\n SlotStatus,\n ThermoActuatorType,\n RoomObjectType,\n ComponentType,\n DeviceDTO,\n LightType,\n FunctionType,\n} from '@/../client-generator/generated-clients/plants';\nimport i18n from '../../translations/i18n';\nimport MxConstants from './mx-constants';\nimport ProtocolConstants from './protocol-constants';\nimport SlotsConfigService from './slots-assign-rules-config';\nimport {\n SlotRuleServiceType,\n WorkflowCallbackData,\n WorkflowCallbackFunction,\n} from './slots-assign-rules-interfaces';\nimport BaseSlotRuleService from './slots-assign-rules-service';\n\nexport default class AssignCommandsAndGroupsSlotRuleService extends BaseSlotRuleService {\n _adjacentSlotVm: Slot | null = null;\n\n constructor(\n roomObject: RoomObjectDTO,\n workflowCallback: WorkflowCallbackFunction\n ) {\n super(\n roomObject,\n -1,\n ThermoActuatorType.None,\n ActuatorModalityType.None,\n workflowCallback\n );\n this.slotRuleServiceType = SlotRuleServiceType.COMMANDS_AND_GROUPS;\n\n this._noOfAdjacent = this.OneAdjacent;\n }\n isLinkedWithCurrentRoomObject(objectSlot: Slot) {\n return (\n objectSlot.linkedObjects?.some(\n (linkedRoomObject) => linkedRoomObject.id == objectSlot.id\n ) ?? false\n );\n }\n\n onSlotMessage(device: DeviceDTO, slot: Slot) {\n const is8BtnDeviceOrCrystalDeviceWithPairSelection = SlotsConfigService.is8BtnDeviceOrCrystalDeviceWithPairSelection(\n device\n );\n\n switch (slot.status) {\n case SlotStatus.Configured:\n {\n if (this.isLinkedWithCurrentRoomObject(slot)) {\n const data: WorkflowCallbackData = {\n warningTitle: `${i18n.global.t(\n 'AppResource.UnlinkThe'\n )} ${i18n.global.t('AppResource.Module')}`,\n warningMessage: `${i18n.global.t(\n 'AppResource.UnlinkMessage'\n )} ${i18n.global.t('AppResource.Module')} ${\n slot.index\n } ${i18n.global.t('AppResource.From')} ${this.roomObject.name}?`,\n _isUnlinkFlow: true,\n isWarningRequested: true,\n };\n this._workflowCallback(\n data,\n () => this.doYesCommand(data, device, slot),\n () => this.doNoCommand(data, device, slot),\n () => this.doAlertCommand(data, device, slot)\n );\n this._adjacentSlotVm =\n device.slots?.find(\n (sl) =>\n sl != null &&\n sl.configurationType != ConfigurationType.None &&\n slot &&\n slot.index &&\n (sl.index == slot.index + 1 || sl.index == slot.index - 1) &&\n (sl.status == SlotStatus.MarkedForLinking ||\n (sl.status == SlotStatus.Configured &&\n this.isLinkedWithCurrentRoomObject(sl))) &&\n sl.assignedComponentType == ComponentType.Actuator\n ) || null;\n }\n }\n break;\n case SlotStatus.NotConfigured:\n {\n if (\n device.modelObject === ProtocolConstants.Device1_5_119 &&\n (this.roomObject.type == RoomObjectType.Shutter ||\n this.roomObject.type == RoomObjectType.Blind)\n ) {\n this._noOfAdjacent = this.ThreeAdjacent;\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.NotConfigured,\n SlotStatus.MarkedForLinking\n );\n } else if (\n (this.roomObject.type == RoomObjectType.Shutter &&\n is8BtnDeviceOrCrystalDeviceWithPairSelection) ||\n (this.roomObject.type == RoomObjectType.Blind &&\n is8BtnDeviceOrCrystalDeviceWithPairSelection)\n ) {\n this._noOfAdjacent = this.TwoAdjacent;\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.NotConfigured,\n SlotStatus.MarkedForLinking,\n false,\n true\n );\n } else {\n this._noOfAdjacent = this.OneAdjacent;\n\n const temSlots = device.slots?.filter(\n (sl) =>\n sl != null &&\n sl.configurationType == ConfigurationType.None &&\n slot &&\n slot.index &&\n (sl.index == slot.index + 1 || sl.index == slot.index - 1) &&\n (sl.status == SlotStatus.MarkedForLinking ||\n (sl.status == SlotStatus.Configured &&\n this.isLinkedWithCurrentRoomObject(sl))) &&\n sl.assignedComponentType == ComponentType.Command\n );\n this._adjacentSlotVm = temSlots\n ? temSlots[temSlots?.length - 1] || null\n : null;\n\n var isDevice15117orDevice15121orDevice15119 =\n device.modelObject &&\n (device.modelObject === ProtocolConstants.Device1_5_117 ||\n device.modelObject === ProtocolConstants.Device1_5_121 ||\n device.modelObject === ProtocolConstants.Device1_5_119 ||\n device.modelObject === ProtocolConstants.Device0_0_121);\n\n // MXSRV-1841\n var isDevice3477 =\n device.modelObject &&\n (device.modelObject === ProtocolConstants.Device1_0_152 ||\n device.modelObject === ProtocolConstants.Device2_2_152);\n\n // MXSRV-1875\n var isDeviceF428 =\n device.modelObject &&\n (device.modelObject === ProtocolConstants.Device1_0_149 ||\n device.modelObject === ProtocolConstants.Device2_0_149);\n\n //MXSRV-1876\n var isDeviceCrystal8Scene =\n device.modelObject &&\n (device.modelObject === ProtocolConstants.Device2_2_17 ||\n device.modelObject === ProtocolConstants.Device2_4_17 ||\n device.modelObject === ProtocolConstants.Device1_3_27 ||\n device.modelObject === ProtocolConstants.Device2_2_27 ||\n device.modelObject === ProtocolConstants.Device1_3_28 ||\n device.modelObject === ProtocolConstants.Device1_3_49 ||\n device.modelObject === ProtocolConstants.Device1_1_49 ||\n device.modelObject === ProtocolConstants.Device2_4_49);\n\n if (\n this._adjacentSlotVm &&\n !isDevice15117orDevice15121orDevice15119 &&\n !isDevice3477 &&\n !isDeviceF428 &&\n !isDeviceCrystal8Scene\n ) {\n const data: WorkflowCallbackData = {\n warningTitle: i18n.global.t(\n 'AppResource.MostrineQuestionTitle'\n ),\n warningMessage: i18n.global.t('AppResource.MostrineQuestion'),\n isConfirmation: true,\n isWarningRequested: true,\n };\n this._workflowCallback(\n data,\n () => this.doYesCommand(data, device, slot),\n () => this.doNoCommand(data, device, slot),\n () => this.doAlertCommand(data, device, slot)\n );\n } else {\n if (this.isSpecialDeviceF428(slot, device)) {\n //LR if true, there is only one slot left in device with model: F428\n var adjacentSlotVm = device.slots?.find(\n (sl) =>\n sl.status == SlotStatus.NotConfigured &&\n slot &&\n slot.index &&\n (sl.index == slot.index + 1 || sl.index == slot.index - 1)\n );\n if (adjacentSlotVm != null) {\n this.addOrUpdateSlot(slot);\n this.addOrUpdateSlot(adjacentSlotVm);\n this.updateConfigurationType(\n slot,\n adjacentSlotVm,\n ConfigurationType.None\n );\n } else {\n const data: WorkflowCallbackData = {\n warningTitle: i18n.global.t(\n 'AppResource.NotEnoughAdjacentChannelsTitle'\n ),\n warningMessage: i18n.global.t(\n 'AppResource.NotEnoughAdjacentChannelsMessage'\n ),\n isConfirmation: false,\n isWarningRequested: true,\n };\n this._workflowCallback(\n data,\n () => this.doYesCommand(data, device, slot),\n () => this.doNoCommand(data, device, slot),\n () => this.doAlertCommand(data, device, slot)\n );\n }\n } else {\n this.addOrUpdateSlot(slot);\n }\n }\n }\n }\n break;\n case SlotStatus.MarkedForLinking:\n {\n if (device.modelObject == ProtocolConstants.Device1_5_119 &&\n (this.roomObject.type == RoomObjectType.Shutter || this.roomObject.type == RoomObjectType.Blind ))\n {\n this._noOfAdjacent = this.ThreeAdjacent;\n this.markOrUnmarkSlot(this.roomObject, slot, device, SlotStatus.MarkedForLinking, SlotStatus.NotConfigured);\n }\n else if ((this.roomObject.type == RoomObjectType.Shutter &&\n is8BtnDeviceOrCrystalDeviceWithPairSelection) || (this.roomObject.type == RoomObjectType.Blind &&\n is8BtnDeviceOrCrystalDeviceWithPairSelection))\n {\n this._noOfAdjacent = this.TwoAdjacent;\n this.markOrUnmarkSlot(this.roomObject, slot, device, SlotStatus.MarkedForLinking, SlotStatus.NotConfigured);\n }\n else\n {\n this._noOfAdjacent = this.OneAdjacent;\n slot.status = SlotStatus.NotConfigured;\n this._adjacentSlotVm = device.slots?.find(sl => sl != null && sl.configurationType != ConfigurationType.None && (slot && slot.index && (sl.index == slot.index + 1 || sl.index == slot.index - 1)) && (sl.status == SlotStatus.MarkedForLinking || (sl.status == SlotStatus.Configured && this.isLinkedWithCurrentRoomObject(sl)))) || null;\n if (slot.configurationType != ConfigurationType.None)\n {\n this.updateConfigurationType(slot, this._adjacentSlotVm, ConfigurationType.None);\n }\n this.removeOrUpdateSlot(slot);\n if (this._adjacentSlotVm && this.isSpecialDeviceF428(slot, device))\n {\n this.removeOrUpdateSlot(this._adjacentSlotVm);\n }\n }\n }\n break;\n case SlotStatus.NotUsed:\n default:\n break;\n }\n }\n\n isSlotCompatibleForMarking(slot: Slot) {\n return (\n this.isSlotRoomObjectTypeMatchingAndNotLinked(slot) &&\n slot.status != SlotStatus.MarkedForLinking\n );\n }\n\n isSpecialDeviceF428(slot: Slot, device: Device) {\n if (slot != null && this.roomObject?.type == RoomObjectType.Shutter) {\n if (device != null && device.model == MxConstants.F428) {\n return true;\n }\n }\n\n return false;\n }\n\n updateConfigurationType(\n selectedSlotViewModel: Slot | null,\n adjacentSlotViewModel: Slot | null,\n configurationType: ConfigurationType\n ) {\n if (selectedSlotViewModel != null) {\n selectedSlotViewModel.configurationType = configurationType;\n }\n if (adjacentSlotViewModel != null) {\n adjacentSlotViewModel.configurationType = configurationType;\n }\n }\n\n areSlotsCompatibleForPresetManagement(device: DeviceDTO) {\n if (this.roomObject?.devices != null && device != null) {\n const isShutterRoomObject =\n this.roomObject.type == RoomObjectType.Shutter;\n const isActuatorModelCorrect = this.roomObject.devices.some((d) =>\n this.isActuatorModelCorrect(d)\n );\n const isLastComponentCollapsed = !!device.model;\n const commandCanHandlePreset = this.hasCommandThatCanHandlePreset(device);\n\n return (\n isShutterRoomObject &&\n isActuatorModelCorrect &&\n isLastComponentCollapsed &&\n commandCanHandlePreset\n );\n }\n return false;\n }\n\n isActuatorModelCorrect(d: DeviceDTO) {\n const deviceHasCorrectFunctionType =\n d.functionType == FunctionType.All ||\n d.functionType == FunctionType.Automation;\n const devicheHasModel = !!d.model;\n const deviceIsActuatorWithAbailableSlots =\n d.slots != null &&\n d.slots.some(\n (s) =>\n (s.status == SlotStatus.MarkedForLinking ||\n s.status == SlotStatus.Configured) &&\n (s.assignedComponentType == ComponentType.Actuator ||\n s.assignedComponentType == ComponentType.None)\n );\n\n return (\n deviceHasCorrectFunctionType &&\n devicheHasModel &&\n d.isShutterWithPosition &&\n deviceIsActuatorWithAbailableSlots\n );\n }\n\n hasCommandThatCanHandlePreset(device: DeviceDTO) {\n return device?.canHandlePreset ?? false;\n }\n\n doNoCommand(data: WorkflowCallbackData, device: DeviceDTO, slot: Slot) {\n super.doNoCommand(data, device, slot);\n if (data._isMostrineFlow)\n {\n this.addOrUpdateSlot(slot);\n data._isMostrineFlow = false;\n }\n data._isUnlinkFlow = false;\n }\n\n doYesCommand(data: WorkflowCallbackData, device: DeviceDTO, slot: Slot) { \n if (slot != null)\n {\n if (data._isUnlinkFlow)\n {\n if (slot.configurationType == ConfigurationType.Mostrine && this._adjacentSlotVm != null)\n {\n this.updateMostrineStatus(slot, this._adjacentSlotVm, ConfigurationType.None);\n }\n this.removeOrUpdateSlot(slot);\n data._isUnlinkFlow = false;\n }\n else if (this._adjacentSlotVm && data._isMostrineFlow)\n {\n this.addOrUpdateSlot(slot);\n this.updateMostrineStatus(slot, this._adjacentSlotVm, ConfigurationType.Mostrine);\n data._isMostrineFlow = false;\n }\n }\n }\n\n doPresetNoCommand(data: WorkflowCallbackData, device: DeviceDTO, slot: Slot) {\n this.addOrUpdateSlot(slot);\n }\n\n doPresetYesCommand(\n data: WorkflowCallbackData,\n device: DeviceDTO,\n slot: Slot\n ) {\n this.addOrUpdateSlot(slot);\n this.updateConfigurationType(\n slot,\n this._adjacentSlotVm,\n ConfigurationType.Preset\n );\n }\n}\n","import {\n ActuatorModalityType,\n Slot,\n SlotStatus,\n ThermoActuatorType,\n DeviceDTO,\n ThermoRoomObjectDTO,\n SystemControlType,\n} from '@/../client-generator/generated-clients/plants';\nimport {\n SlotRuleServiceType,\n WorkflowCallbackFunction,\n} from './slots-assign-rules-interfaces';\nimport BaseSlotRuleService from './slots-assign-rules-service';\n\nexport default class AssignThermoCoolingActuatorSlotRuleService extends BaseSlotRuleService {\n declare roomObject: ThermoRoomObjectDTO;\n\n constructor(\n roomObject: ThermoRoomObjectDTO,\n workflowCallback: WorkflowCallbackFunction\n ) {\n super(\n roomObject,\n -1,\n ThermoActuatorType.CoolingValve,\n roomObject.actuatorModalityType ?? ActuatorModalityType.None,\n workflowCallback\n );\n this.slotRuleServiceType = SlotRuleServiceType.THERMO_COOLING_ACTUATORS;\n\n this._noOfAdjacent = this.getNoOfAdjacentSlots(\n roomObject.coolingSystemControlType ?? SystemControlType.None\n );\n }\n\n addOrUpdateSlot(\n slotViewModel: Slot,\n thermoActuatorType = ThermoActuatorType.None\n ) {\n if (slotViewModel != null) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slotViewModel.thermoActuatorTypes,\n this.roomObject.id\n );\n if (\n slotViewModel.status == SlotStatus.MarkedForLinking &&\n tmpActuatorType == ThermoActuatorType.HeatingAndCoolingValve\n ) {\n super.addOrUpdateSlot(slotViewModel, ThermoActuatorType.HeatingValve);\n } else {\n super.addOrUpdateSlot(\n slotViewModel,\n tmpActuatorType == ThermoActuatorType.HeatingValve\n ? ThermoActuatorType.HeatingAndCoolingValve\n : ThermoActuatorType.CoolingValve\n );\n }\n }\n }\n\n isSameSystemControlType() {\n return !(\n this.roomObject.heatingSystemControlType != SystemControlType.None &&\n this.roomObject.coolingSystemControlType != SystemControlType.None &&\n this.roomObject.heatingSystemControlType !=\n this.roomObject.coolingSystemControlType\n );\n }\n\n onSlotMessage(device: DeviceDTO, slot: Slot) {\n if (this.roomObject != null) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n if (\n (slot.status == SlotStatus.MarkedForLinking ||\n slot.status == SlotStatus.MarkedAdjacent ||\n this.isSlotLinkedWithCurrentRoomObject(slot)) &&\n this.roomObject.actuatorModalityType == ActuatorModalityType.Mixed &&\n this.isSameSystemControlType() &&\n (this.roomObject.coolingSystemControlType ==\n SystemControlType.OneOnOffValve ||\n this.roomObject.coolingSystemControlType ==\n SystemControlType.OneOpenCloseValve ||\n this.roomObject.coolingSystemControlType ==\n SystemControlType.OneProportionalValve) &&\n ((tmpActuatorType == ThermoActuatorType.HeatingAndCoolingValve &&\n slot.status == SlotStatus.MarkedAdjacent) ||\n tmpActuatorType == ThermoActuatorType.HeatingValve ||\n (tmpActuatorType == ThermoActuatorType.HeatingAndCoolingValve &&\n slot.status == SlotStatus.MarkedForLinking))\n ) {\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.MarkedForLinking,\n SlotStatus.MarkedForLinking\n );\n } else if (\n (slot.status == SlotStatus.NotConfigured &&\n (slot.linkedObjects == null ||\n !(slot.linkedObjects.length > 0) ||\n (this.isSlotLinkedWithCurrentRoomObject(slot) &&\n slot.linkedObjects.length == this.OneElement))) ||\n ((tmpActuatorType == ThermoActuatorType.CoolingValve ||\n tmpActuatorType == ThermoActuatorType.HeatingAndCoolingValve) &&\n (this.isSlotLinkedWithCurrentRoomObject(slot) ||\n slot.status == SlotStatus.MarkedForLinking ||\n slot.status == SlotStatus.MarkedAdjacent))\n ) {\n super.onSlotMessage(device, slot);\n }\n }\n }\n\n isSlotCompatibleForMarking(slot: Slot) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n return (\n slot != null &&\n this.roomObject != null &&\n this.roomObject.heatingSystemControlType ==\n this.roomObject.coolingSystemControlType &&\n tmpActuatorType == ThermoActuatorType.HeatingValve &&\n this.roomObject.actuatorModalityType == ActuatorModalityType.Mixed &&\n (this.roomObject.heatingSystemControlType ==\n SystemControlType.OneOnOffValve ||\n this.roomObject.heatingSystemControlType ==\n SystemControlType.OneOpenCloseValve ||\n this.roomObject.heatingSystemControlType ==\n SystemControlType.OneProportionalValve)\n );\n }\n\n isSlotCompatibleForUnmarking(slot: Slot) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n return (\n slot != null &&\n this.roomObject != null &&\n (tmpActuatorType == ThermoActuatorType.CoolingValve ||\n (tmpActuatorType == ThermoActuatorType.HeatingAndCoolingValve &&\n this.roomObject.actuatorModalityType == ActuatorModalityType.Mixed))\n );\n }\n\n updateForSlotChanging(slot: Slot) {\n if (slot != null && this.roomObject != null) {\n if (!slot.thermoActuatorTypes) slot.thermoActuatorTypes = {};\n slot.thermoActuatorTypes[this.roomObject.id ?? ''] =\n ThermoActuatorType.HeatingValve;\n }\n }\n\n isLimitationReached(slotsToBeMarked: Slot[] | null) {\n if (this.roomObject?.devices != null && slotsToBeMarked != null) {\n var noOfSelectedValves = this.roomObject.devices\n .flatMap((d) => d.slots)\n .filter((s) =>\n [\n ThermoActuatorType.HeatingValve,\n ThermoActuatorType.CoolingValve,\n ThermoActuatorType.HeatingAndCoolingValve,\n ].includes(\n this.getCurrentThermoActuatorType(\n s?.thermoActuatorTypes,\n this.roomObject.id\n )\n )\n ).length;\n\n var noOfSlotsToBeAddedInParam = slotsToBeMarked.filter(\n (s) =>\n this.getCurrentThermoActuatorType(\n s.thermoActuatorTypes,\n this.roomObject.id\n ) != ThermoActuatorType.CoolingValve\n ).length;\n\n if (\n noOfSelectedValves + noOfSlotsToBeAddedInParam <=\n this.MaximumNoOfThermostatSlots\n ) {\n return false;\n }\n return true;\n }\n\n return false;\n }\n}\n","import {\n ActuatorModalityType,\n Slot,\n SlotStatus,\n ThermoActuatorType,\n DeviceDTO,\n ThermoRoomObjectDTO,\n SystemControlType,\n} from '@/../client-generator/generated-clients/plants';\nimport {\n SlotRuleServiceType,\n WorkflowCallbackFunction,\n} from './slots-assign-rules-interfaces';\nimport BaseSlotRuleService from './slots-assign-rules-service';\n\nexport default class AssignThermoCoolingPumpSlotRuleService extends BaseSlotRuleService {\n declare roomObject: ThermoRoomObjectDTO;\n\n constructor(\n roomObject: ThermoRoomObjectDTO,\n workflowCallback: WorkflowCallbackFunction\n ) {\n super(\n roomObject,\n -1,\n ThermoActuatorType.CoolingPump,\n roomObject.actuatorModalityType ?? ActuatorModalityType.None,\n workflowCallback\n );\n this.slotRuleServiceType = SlotRuleServiceType.THERMO_COOLING_ACTUATORS;\n\n this._noOfAdjacent = this.getNoOfAdjacentSlots(\n roomObject.coolingSystemControlType ?? SystemControlType.None\n );\n }\n\n addOrUpdateSlot(\n slotViewModel: Slot,\n thermoActuatorType = ThermoActuatorType.None\n ) {\n if (slotViewModel != null) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slotViewModel.thermoActuatorTypes,\n this.roomObject.id\n );\n if (tmpActuatorType == ThermoActuatorType.HeatingAndCoolingPump) {\n super.addOrUpdateSlot(slotViewModel, ThermoActuatorType.HeatingPump);\n } else {\n super.addOrUpdateSlot(\n slotViewModel,\n tmpActuatorType == ThermoActuatorType.HeatingPump\n ? ThermoActuatorType.HeatingAndCoolingPump\n : ThermoActuatorType.CoolingPump\n );\n }\n }\n }\n\n isSameSystemControlType() {\n return !(\n this.roomObject.heatingSystemControlType != SystemControlType.None &&\n this.roomObject.coolingSystemControlType != SystemControlType.None &&\n this.roomObject.heatingSystemControlType !=\n this.roomObject.coolingSystemControlType\n );\n }\n\n onSlotMessage(device: DeviceDTO, slot: Slot) {\n if (this.roomObject != null) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n if (\n !this.isSlotLinkedWithCurrentRoomObject(slot) &&\n this.isSlotLinkedAsPump(slot) &&\n (slot.status == SlotStatus.NotConfigured ||\n slot.status == SlotStatus.Configured)\n ) {\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.Configured,\n SlotStatus.MarkedForLinking\n );\n } else if (\n (slot.status == SlotStatus.MarkedForLinking ||\n slot.status == SlotStatus.MarkedAdjacent ||\n this.isSlotLinkedWithCurrentRoomObject(slot)) &&\n (this.roomObject.actuatorModalityType ==\n ActuatorModalityType.Separate ||\n this.roomObject.actuatorModalityType == ActuatorModalityType.Mixed) &&\n ((tmpActuatorType == ThermoActuatorType.HeatingAndCoolingPump &&\n slot.status == SlotStatus.MarkedForLinking) ||\n tmpActuatorType == ThermoActuatorType.HeatingPump ||\n (tmpActuatorType == ThermoActuatorType.HeatingAndCoolingPump &&\n slot.status == SlotStatus.MarkedAdjacent))\n ) {\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.MarkedForLinking,\n SlotStatus.MarkedForLinking\n );\n } else if (\n slot.status == SlotStatus.NotConfigured ||\n tmpActuatorType == ThermoActuatorType.CoolingPump ||\n tmpActuatorType == ThermoActuatorType.HeatingAndCoolingPump\n ) {\n super.onSlotMessage(device, slot);\n }\n }\n }\n\n isSlotCompatibleForMarking(slot: Slot) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n return (\n slot != null &&\n (tmpActuatorType == ThermoActuatorType.HeatingPump ||\n tmpActuatorType == ThermoActuatorType.HeatingAndCoolingPump ||\n this.isSlotRoomObjectTypeMatchingAndNotLinked(slot) ||\n this.isSlotLinkedAsPump(slot))\n );\n }\n\n updateForSlotChanging(slot: Slot) {\n if (slot != null && this.roomObject != null) {\n if (!slot.thermoActuatorTypes) slot.thermoActuatorTypes = {};\n slot.thermoActuatorTypes[this.roomObject.id ?? ''] =\n ThermoActuatorType.HeatingPump;\n }\n }\n\n isLimitationReached(slotsToBeMarked: Slot[] | null) {\n if (this.roomObject?.devices != null && slotsToBeMarked != null) {\n var noOfSelectedValves = this.roomObject.devices\n .flatMap((d) => d.slots)\n .filter((s) =>\n [\n ThermoActuatorType.HeatingPump,\n ThermoActuatorType.CoolingPump,\n ThermoActuatorType.HeatingAndCoolingPump,\n ].includes(\n this.getCurrentThermoActuatorType(\n s?.thermoActuatorTypes,\n this.roomObject.id\n )\n )\n ).length;\n\n var noOfSlotsToBeAddedInParam = slotsToBeMarked.filter(\n (s) =>\n this.getCurrentThermoActuatorType(\n s.thermoActuatorTypes,\n this.roomObject.id\n ) != ThermoActuatorType.HeatingPump\n ).length;\n\n if (\n noOfSelectedValves + noOfSlotsToBeAddedInParam <=\n this.MaximumNoOfThermostatSlots\n ) {\n return false;\n }\n return true;\n }\n\n return false;\n }\n}\n","import {\n ActuatorModalityType,\n Slot,\n SlotStatus,\n ThermoActuatorType,\n DeviceDTO,\n ThermoRoomObjectDTO,\n SystemControlType,\n} from '@/../client-generator/generated-clients/plants';\nimport {\n SlotRuleServiceType,\n WorkflowCallbackFunction,\n} from './slots-assign-rules-interfaces';\nimport BaseSlotRuleService from './slots-assign-rules-service';\n\nexport default class AssignThermoHeatingActuatorSlotRuleService extends BaseSlotRuleService {\n declare roomObject: ThermoRoomObjectDTO;\n\n constructor(\n roomObject: ThermoRoomObjectDTO,\n workflowCallback: WorkflowCallbackFunction\n ) {\n super(\n roomObject,\n -1,\n ThermoActuatorType.HeatingValve,\n roomObject.actuatorModalityType ?? ActuatorModalityType.None,\n workflowCallback\n );\n this.slotRuleServiceType = SlotRuleServiceType.THERMO_HEATING_ACTUATORS;\n\n this._noOfAdjacent = this.getNoOfAdjacentSlots(\n roomObject.heatingSystemControlType ?? SystemControlType.None\n );\n }\n\n addOrUpdateSlot(\n slotViewModel: Slot,\n thermoActuatorType = ThermoActuatorType.None\n ) {\n if (slotViewModel != null) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slotViewModel.thermoActuatorTypes,\n this.roomObject.id\n );\n if (tmpActuatorType == ThermoActuatorType.HeatingAndCoolingValve) {\n super.addOrUpdateSlot(slotViewModel, ThermoActuatorType.CoolingValve);\n } else {\n super.addOrUpdateSlot(\n slotViewModel,\n tmpActuatorType == ThermoActuatorType.CoolingValve\n ? ThermoActuatorType.HeatingAndCoolingValve\n : ThermoActuatorType.HeatingValve\n );\n }\n }\n }\n\n isSameSystemControlType() {\n return !(\n this.roomObject.heatingSystemControlType != SystemControlType.None &&\n this.roomObject.coolingSystemControlType != SystemControlType.None &&\n this.roomObject.heatingSystemControlType !=\n this.roomObject.coolingSystemControlType\n );\n }\n\n onSlotMessage(device: DeviceDTO, slot: Slot) {\n if (this.roomObject != null) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n if (\n (slot.status == SlotStatus.MarkedForLinking ||\n slot.status == SlotStatus.MarkedAdjacent ||\n this.isSlotLinkedWithCurrentRoomObject(slot)) &&\n this.roomObject.actuatorModalityType == ActuatorModalityType.Mixed &&\n this.isSameSystemControlType() &&\n (this.roomObject.heatingSystemControlType ==\n SystemControlType.OneOnOffValve ||\n this.roomObject.heatingSystemControlType ==\n SystemControlType.OneOpenCloseValve ||\n this.roomObject.heatingSystemControlType ==\n SystemControlType.OneProportionalValve) &&\n ((tmpActuatorType == ThermoActuatorType.HeatingAndCoolingValve &&\n slot.status == SlotStatus.MarkedForLinking) ||\n tmpActuatorType == ThermoActuatorType.CoolingValve ||\n (tmpActuatorType == ThermoActuatorType.HeatingAndCoolingValve &&\n slot.status == SlotStatus.MarkedAdjacent))\n ) {\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.MarkedForLinking,\n SlotStatus.MarkedForLinking\n );\n } else if (\n (slot.status == SlotStatus.NotConfigured &&\n (slot.linkedObjects == null ||\n !slot.linkedObjects.length ||\n (this.isSlotLinkedWithCurrentRoomObject(slot) &&\n slot.linkedObjects.length == this.OneElement))) ||\n ((tmpActuatorType == ThermoActuatorType.HeatingValve ||\n tmpActuatorType == ThermoActuatorType.HeatingAndCoolingValve) &&\n (this.isSlotLinkedWithCurrentRoomObject(slot) ||\n slot.status == SlotStatus.MarkedForLinking ||\n slot.status == SlotStatus.MarkedAdjacent))\n ) {\n super.onSlotMessage(device, slot);\n }\n }\n }\n\n isSlotCompatibleForMarking(slot: Slot) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n return (\n slot != null &&\n this.roomObject != null &&\n this.roomObject.heatingSystemControlType ==\n this.roomObject.coolingSystemControlType &&\n tmpActuatorType == ThermoActuatorType.CoolingValve &&\n this.roomObject.actuatorModalityType == ActuatorModalityType.Mixed &&\n (this.roomObject.heatingSystemControlType ==\n SystemControlType.OneOnOffValve ||\n this.roomObject.heatingSystemControlType ==\n SystemControlType.OneOpenCloseValve ||\n this.roomObject.heatingSystemControlType ==\n SystemControlType.OneProportionalValve)\n );\n }\n\n isSlotCompatibleForUnmarking(slot: Slot) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n return (\n slot != null &&\n this.roomObject != null &&\n (tmpActuatorType == ThermoActuatorType.HeatingValve ||\n (tmpActuatorType == ThermoActuatorType.HeatingAndCoolingValve &&\n this.roomObject.actuatorModalityType == ActuatorModalityType.Mixed))\n );\n }\n\n updateForSlotChanging(slot: Slot) {\n if (slot != null && this.roomObject != null) {\n if (!slot.thermoActuatorTypes) slot.thermoActuatorTypes = {};\n slot.thermoActuatorTypes[this.roomObject.id ?? ''] =\n ThermoActuatorType.CoolingValve;\n }\n }\n\n isLimitationReached(slotsToBeMarked: Slot[] | null) {\n if (this.roomObject?.devices != null && slotsToBeMarked != null) {\n var noOfSelectedValves = this.roomObject.devices\n .flatMap((d) => d.slots)\n .filter((s) =>\n [\n ThermoActuatorType.HeatingValve,\n ThermoActuatorType.CoolingValve,\n ThermoActuatorType.HeatingAndCoolingValve,\n ].includes(\n this.getCurrentThermoActuatorType(\n s?.thermoActuatorTypes,\n this.roomObject.id\n )\n )\n ).length;\n\n var noOfSlotsToBeAddedInParam = slotsToBeMarked.filter(\n (s) =>\n this.getCurrentThermoActuatorType(\n s.thermoActuatorTypes,\n this.roomObject.id\n ) != ThermoActuatorType.CoolingValve\n ).length;\n\n if (\n noOfSelectedValves + noOfSlotsToBeAddedInParam <=\n this.MaximumNoOfThermostatSlots\n ) {\n return false;\n }\n return true;\n }\n\n return false;\n }\n}\n","import {\n ActuatorModalityType,\n Slot,\n SlotStatus,\n ThermoActuatorType,\n DeviceDTO,\n ThermoRoomObjectDTO,\n SystemControlType,\n} from '@/../client-generator/generated-clients/plants';\nimport {\n SlotRuleServiceType,\n WorkflowCallbackFunction,\n} from './slots-assign-rules-interfaces';\nimport BaseSlotRuleService from './slots-assign-rules-service';\n\nexport default class AssignThermoHeatingPumpSlotRuleService extends BaseSlotRuleService {\n declare roomObject: ThermoRoomObjectDTO;\n\n constructor(\n roomObject: ThermoRoomObjectDTO,\n workflowCallback: WorkflowCallbackFunction\n ) {\n super(\n roomObject,\n -1,\n ThermoActuatorType.HeatingPump,\n roomObject.actuatorModalityType ?? ActuatorModalityType.None,\n workflowCallback\n );\n this.slotRuleServiceType = SlotRuleServiceType.THERMO_HEATING_ACTUATORS;\n\n this._noOfAdjacent = this.getNoOfAdjacentSlots(\n roomObject.heatingSystemControlType ?? SystemControlType.None\n );\n }\n\n addOrUpdateSlot(\n slotViewModel: Slot,\n thermoActuatorType = ThermoActuatorType.None\n ) {\n if (slotViewModel != null) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slotViewModel.thermoActuatorTypes,\n this.roomObject.id\n );\n if (tmpActuatorType == ThermoActuatorType.HeatingAndCoolingPump) {\n super.addOrUpdateSlot(slotViewModel, ThermoActuatorType.CoolingPump);\n } else {\n super.addOrUpdateSlot(\n slotViewModel,\n tmpActuatorType == ThermoActuatorType.CoolingPump\n ? ThermoActuatorType.HeatingAndCoolingPump\n : ThermoActuatorType.HeatingPump\n );\n }\n }\n }\n\n isSameSystemControlType() {\n return !(\n this.roomObject.heatingSystemControlType != SystemControlType.None &&\n this.roomObject.coolingSystemControlType != SystemControlType.None &&\n this.roomObject.heatingSystemControlType !=\n this.roomObject.coolingSystemControlType\n );\n }\n\n onSlotMessage(device: DeviceDTO, slot: Slot) {\n if (this.roomObject != null) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n if (\n !this.isSlotLinkedWithCurrentRoomObject(slot) &&\n this.isSlotLinkedAsPump(slot) &&\n (slot.status == SlotStatus.NotConfigured ||\n slot.status == SlotStatus.Configured)\n ) {\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.Configured,\n SlotStatus.MarkedForLinking\n );\n } else if (\n (slot.status == SlotStatus.MarkedForLinking ||\n slot.status == SlotStatus.MarkedAdjacent ||\n this.isSlotLinkedWithCurrentRoomObject(slot)) &&\n (this.roomObject.actuatorModalityType ==\n ActuatorModalityType.Separate ||\n this.roomObject.actuatorModalityType == ActuatorModalityType.Mixed) &&\n ((tmpActuatorType == ThermoActuatorType.HeatingAndCoolingPump &&\n slot.status == SlotStatus.MarkedForLinking) ||\n tmpActuatorType == ThermoActuatorType.CoolingPump ||\n (tmpActuatorType == ThermoActuatorType.HeatingAndCoolingPump &&\n slot.status == SlotStatus.MarkedAdjacent))\n ) {\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.MarkedForLinking,\n SlotStatus.MarkedForLinking\n );\n } else if (\n slot.status == SlotStatus.NotConfigured ||\n tmpActuatorType == ThermoActuatorType.HeatingPump ||\n tmpActuatorType == ThermoActuatorType.HeatingAndCoolingPump\n ) {\n super.onSlotMessage(device, slot);\n }\n }\n }\n\n isSlotCompatibleForMarking(slot: Slot) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n return (\n slot != null &&\n (tmpActuatorType == ThermoActuatorType.CoolingPump ||\n tmpActuatorType == ThermoActuatorType.HeatingAndCoolingPump ||\n this.isSlotRoomObjectTypeMatchingAndNotLinked(slot) ||\n this.isSlotLinkedAsPump(slot))\n );\n }\n\n updateForSlotChanging(slot: Slot) {\n if (slot != null && this.roomObject != null) {\n if (!slot.thermoActuatorTypes) slot.thermoActuatorTypes = {};\n slot.thermoActuatorTypes[this.roomObject.id ?? ''] =\n ThermoActuatorType.CoolingPump;\n }\n }\n\n isLimitationReached(slotsToBeMarked: Slot[] | null) {\n if (this.roomObject?.devices != null && slotsToBeMarked != null) {\n var noOfSelectedValves = this.roomObject.devices\n .flatMap((d) => d.slots)\n .filter((s) =>\n [\n ThermoActuatorType.HeatingPump,\n ThermoActuatorType.CoolingPump,\n ThermoActuatorType.HeatingAndCoolingPump,\n ].includes(\n this.getCurrentThermoActuatorType(\n s?.thermoActuatorTypes,\n this.roomObject.id\n )\n )\n ).length;\n\n var noOfSlotsToBeAddedInParam = slotsToBeMarked.filter(\n (s) =>\n this.getCurrentThermoActuatorType(\n s.thermoActuatorTypes,\n this.roomObject.id\n ) != ThermoActuatorType.CoolingPump\n ).length;\n\n if (\n noOfSelectedValves + noOfSlotsToBeAddedInParam <=\n this.MaximumNoOfThermostatSlots\n ) {\n return false;\n }\n return true;\n }\n\n return false;\n }\n}\n","import {\n ActuatorModalityType,\n Slot,\n SlotStatus,\n ThermoActuatorType,\n DeviceDTO,\n ThermoRoomObjectDTO,\n SystemControlType,\n} from '@/../client-generator/generated-clients/plants';\nimport {\n SlotRuleServiceType,\n WorkflowCallbackFunction,\n} from './slots-assign-rules-interfaces';\nimport BaseSlotRuleService from './slots-assign-rules-service';\n\nexport default class AssignThermoSharedActuatorSlotRuleService extends BaseSlotRuleService {\n declare roomObject: ThermoRoomObjectDTO;\n\n constructor(\n roomObject: ThermoRoomObjectDTO,\n workflowCallback: WorkflowCallbackFunction\n ) {\n super(\n roomObject,\n -1,\n ThermoActuatorType.SharedValve,\n roomObject.actuatorModalityType ?? ActuatorModalityType.None,\n workflowCallback\n );\n this.slotRuleServiceType = SlotRuleServiceType.THERMO_HEATING_ACTUATORS;\n\n this._noOfAdjacent = this.getNoOfAdjacentSlots(\n roomObject.sharedSystemControlType ?? SystemControlType.None\n );\n }\n\n addOrUpdateSlot(\n slotViewModel: Slot,\n thermoActuatorType = ThermoActuatorType.None\n ) {\n super.addOrUpdateSlot(slotViewModel, ThermoActuatorType.SharedValve);\n }\n\n onSlotMessage(device: DeviceDTO, slot: Slot) {\n if (this.roomObject != null) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n if (\n slot.status == SlotStatus.Configured ||\n slot.status == SlotStatus.MarkedForLinking ||\n slot.status == SlotStatus.MarkedAdjacent\n ) {\n if (tmpActuatorType == ThermoActuatorType.SharedValve) {\n super.onSlotMessage(device, slot);\n }\n } else {\n super.onSlotMessage(device, slot);\n }\n }\n }\n\n isLimitationReached(slotsToBeMarked: Slot[] | null) {\n if (this.roomObject?.devices != null && slotsToBeMarked != null) {\n var noOfSelectedValves = this.roomObject.devices\n .flatMap((d) => d.slots)\n .filter((s) =>\n [ThermoActuatorType.SharedValve].includes(\n this.getCurrentThermoActuatorType(\n s?.thermoActuatorTypes,\n this.roomObject.id\n )\n )\n ).length;\n\n var noOfSlotsToBeAddedInParam = slotsToBeMarked.length;\n\n if (\n noOfSelectedValves + noOfSlotsToBeAddedInParam <=\n this.MaximumNoOfThermostatSlots\n ) {\n return false;\n }\n return true;\n }\n\n return false;\n }\n}\n","import {\n ActuatorModalityType,\n Slot,\n SlotStatus,\n ThermoActuatorType,\n DeviceDTO,\n ThermoRoomObjectDTO,\n SystemControlType,\n} from '@/../client-generator/generated-clients/plants';\nimport {\n SlotRuleServiceType,\n WorkflowCallbackFunction,\n} from './slots-assign-rules-interfaces';\nimport BaseSlotRuleService from './slots-assign-rules-service';\n\nexport default class AssignThermoSharedPumpSlotRuleService extends BaseSlotRuleService {\n declare roomObject: ThermoRoomObjectDTO;\n\n constructor(\n roomObject: ThermoRoomObjectDTO,\n workflowCallback: WorkflowCallbackFunction\n ) {\n super(\n roomObject,\n -1,\n ThermoActuatorType.SharedPump,\n roomObject.actuatorModalityType ?? ActuatorModalityType.None,\n workflowCallback\n );\n this.slotRuleServiceType = SlotRuleServiceType.THERMO_SHARED_PUMPS;\n\n this._noOfAdjacent = this.getNoOfAdjacentSlots(\n roomObject.sharedSystemControlType ?? SystemControlType.None\n );\n }\n\n addOrUpdateSlot(\n slotViewModel: Slot,\n thermoActuatorType = ThermoActuatorType.None\n ) {\n super.addOrUpdateSlot(slotViewModel, ThermoActuatorType.SharedPump);\n }\n\n onSlotMessage(device: DeviceDTO, slot: Slot) {\n if (this.roomObject != null) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n if (\n !this.isSlotLinkedWithCurrentRoomObject(slot) &&\n this.isSlotLinkedAsPump(slot) &&\n (slot.status == SlotStatus.NotConfigured ||\n slot.status == SlotStatus.Configured)\n ) {\n this.markOrUnmarkSlot(\n this.roomObject,\n slot,\n device,\n SlotStatus.Configured,\n SlotStatus.MarkedForLinking\n );\n } else if (\n slot.status == SlotStatus.NotConfigured ||\n tmpActuatorType == ThermoActuatorType.SharedPump\n ) {\n super.onSlotMessage(device, slot);\n }\n }\n }\n\n isSlotCompatibleForMarking(slot: Slot) {\n const tmpActuatorType = this.getCurrentThermoActuatorType(\n slot.thermoActuatorTypes,\n this.roomObject.id\n );\n return (\n slot != null &&\n (tmpActuatorType == ThermoActuatorType.SharedPump ||\n this.isSlotRoomObjectTypeMatchingAndNotLinked(slot) ||\n this.isSlotLinkedAsPump(slot))\n );\n }\n\n isLimitationReached(slotsToBeMarked: Slot[] | null) {\n if (this.roomObject?.devices != null && slotsToBeMarked != null) {\n var noOfSelectedValves = this.roomObject.devices\n .flatMap((d) => d.slots)\n .filter((s) =>\n [ThermoActuatorType.SharedPump].includes(\n this.getCurrentThermoActuatorType(\n s?.thermoActuatorTypes,\n this.roomObject.id\n )\n )\n ).length;\n\n var noOfSlotsToBeAddedInParam = slotsToBeMarked.length;\n\n if (\n noOfSelectedValves + noOfSlotsToBeAddedInParam <=\n this.MaximumNoOfThermostatSlots\n ) {\n return false;\n }\n return true;\n }\n\n return false;\n }\n}\n","import {\n RoomObjectDTO,\n SlotStatus,\n SystemControlType,\n ThermoActuatorType,\n ThermoRoomObjectDTO,\n ThermoTypeOfObject,\n} from '@/../client-generator/generated-clients/plants';\nimport AssignAutomationActuatorSlotRuleService from '@/core/services/slots-assign-rules-service/slots-assign-rules-automation-actuator-service';\nimport AssignAutomationCommandsSlotRuleService from '@/core/services/slots-assign-rules-service/slots-assign-rules-automation-commands-service';\nimport AssignCommandsAndGroupsSlotRuleService from '@/core/services/slots-assign-rules-service/slots-assign-rules-commands-and-groups-service';\nimport {\n SlotRuleServiceType,\n WorkflowCallbackData,\n} from '@/core/services/slots-assign-rules-service/slots-assign-rules-interfaces';\nimport BaseSlotRuleService from '@/core/services/slots-assign-rules-service/slots-assign-rules-service';\nimport AssignThermoCoolingActuatorSlotRuleService from '@/core/services/slots-assign-rules-service/slots-assign-rules-thermo-cooling-actuator-service';\nimport AssignThermoCoolingPumpSlotRuleService from '@/core/services/slots-assign-rules-service/slots-assign-rules-thermo-cooling-pump-service';\nimport AssignThermoHeatingActuatorSlotRuleService from '@/core/services/slots-assign-rules-service/slots-assign-rules-thermo-heating-actuator-service';\nimport AssignThermoHeatingPumpSlotRuleService from '@/core/services/slots-assign-rules-service/slots-assign-rules-thermo-heating-pump-service';\nimport AssignThermoSharedActuatorSlotRuleService from '@/core/services/slots-assign-rules-service/slots-assign-rules-thermo-shared-actuator-service';\nimport AssignThermoSharedPumpSlotRuleService from '@/core/services/slots-assign-rules-service/slots-assign-rules-thermo-shared-pump-service';\nimport { convertThermoRuleServiceTypeToThermoActuatorType } from '@/core/utils/utils';\nimport { Options } from 'vue-class-component';\nimport SlotItem from './SlotItem';\n\n@Options({\n name: 'SlotListItem',\n props: {\n showBar: {\n type: Boolean,\n default: false,\n },\n },\n})\nexport default class SlotListItem extends SlotItem {\n slotRuleService!: BaseSlotRuleService;\n\n popupData: WorkflowCallbackData | null = null; //popup data, contains which popup open and other data\n doYesCommand?: Function; //callback -> callback yes command\n doNoCommand?: Function; ////callback -> callback no command\n doAlertCommand?: Function; ////callback -> callback alert 'ok' command\n\n created() {\n // slot rules are managed by a service, specific for actuators or commands\n // clicking on a slot triggers the onSlotMessage service method.\n // the method sets slots status and other stuff, or if needed use a callback (the function param in the constructor)\n // to ask user an action (ex. popup with yes/no or ok). Clicking on a action triggers another action in the service\n // which sets slots status and other stuff.\n\n const ruleSetClassMapping = {\n [SlotRuleServiceType.AUTOMATION_ACTUATOR]: AssignAutomationActuatorSlotRuleService,\n [SlotRuleServiceType.AUTOMATION_COMMAND]: AssignAutomationCommandsSlotRuleService,\n [SlotRuleServiceType.THERMO_HEATING_ACTUATORS]: AssignThermoHeatingActuatorSlotRuleService,\n [SlotRuleServiceType.THERMO_COOLING_ACTUATORS]: AssignThermoCoolingActuatorSlotRuleService,\n [SlotRuleServiceType.THERMO_HEATING_PUMPS]: AssignThermoHeatingPumpSlotRuleService,\n [SlotRuleServiceType.THERMO_COOLING_PUMPS]: AssignThermoCoolingPumpSlotRuleService,\n [SlotRuleServiceType.THERMO_SHARED_ACTUATORS]: AssignThermoSharedActuatorSlotRuleService,\n [SlotRuleServiceType.THERMO_SHARED_PUMPS]: AssignThermoSharedPumpSlotRuleService,\n [SlotRuleServiceType.COMMANDS_AND_GROUPS]: AssignCommandsAndGroupsSlotRuleService,\n [SlotRuleServiceType.THERMO_THERMO]: undefined,\n [SlotRuleServiceType.THERMO_PROBE]: undefined,\n };\n const ruleSetClassToInstantiate = ruleSetClassMapping[this.ruleServiceType];\n if (ruleSetClassToInstantiate !== undefined) {\n this.slotRuleService = new ruleSetClassToInstantiate(\n this.linkableObject as RoomObjectDTO,\n (obj, doYesCommand, doNoCommand, doAlertCommand) => {\n this.popupData = obj;\n this.doYesCommand = doYesCommand;\n this.doNoCommand = doNoCommand;\n this.doAlertCommand = doAlertCommand;\n }\n );\n }\n }\n\n get slotName() {\n switch (this.ruleServiceType) {\n case SlotRuleServiceType.AUTOMATION_ACTUATOR:\n case SlotRuleServiceType.THERMO_HEATING_ACTUATORS:\n case SlotRuleServiceType.THERMO_COOLING_ACTUATORS:\n case SlotRuleServiceType.THERMO_HEATING_PUMPS:\n case SlotRuleServiceType.THERMO_COOLING_PUMPS:\n case SlotRuleServiceType.THERMO_SHARED_ACTUATORS:\n case SlotRuleServiceType.THERMO_SHARED_PUMPS:\n return this.$t('AppResource.ChannelUpper').toString();\n case SlotRuleServiceType.AUTOMATION_COMMAND:\n case SlotRuleServiceType.COMMANDS_AND_GROUPS:\n return this.$t('AppResource.ModuleUpper').toString();\n }\n }\n\n get linkDescription() {\n var noOfLinkedRoomObjects = this.objectSlot?.linkedObjects?.length ?? 0;\n if (\n noOfLinkedRoomObjects == this.OneElement &&\n !this.isLinkedWithCurrentRoomObject\n ) {\n return this.objectSlot.status == SlotStatus.MarkedForLinking\n ? `${this.$t('AppResource.LinkedWith')} ${\n noOfLinkedRoomObjects + this.OneElement\n } ${this.$t('AppResource.ObjectsLower')}`\n : `${this.$t('AppResource.LinkedWith')} ${\n this.objectSlot.linkedObjects![this.FirstElement].name\n }`;\n }\n\n if (noOfLinkedRoomObjects > this.OneElement) {\n if (this.isLinkedWithCurrentRoomObject) {\n if (this.objectSlot.status == SlotStatus.NotConfigured) {\n const copyLinkedRoomObjects =\n this.objectSlot.linkedObjects?.filter(\n (item) => item.id !== this.linkableObject.id\n ) ?? [];\n return noOfLinkedRoomObjects == this.TwoElements\n ? `${this.$t('AppResource.LinkedWith')} ${\n copyLinkedRoomObjects[this.FirstElement]?.name\n }`\n : `${this.$t('AppResource.LinkedWith')} ${\n noOfLinkedRoomObjects - this.OneElement\n } ${this.$t('AppResource.ObjectsLower')}`;\n }\n\n return `$\"{AppResource.LinkedWith} {noOfLinkedRoomObjects} {AppResource.ObjectsLower}`;\n }\n return this.objectSlot.status == SlotStatus.MarkedForLinking\n ? `${this.$t('AppResource.LinkedWith')} ${\n noOfLinkedRoomObjects + this.OneElement\n } ${this.$t('AppResource.ObjectsLower')}`\n : `${this.$t(\n 'AppResource.LinkedWith'\n )} ${noOfLinkedRoomObjects} ${this.$t('AppResource.ObjectsLower')}`;\n }\n\n var valveOrFancoilControlType = this.$t('AppResource.Valve').toLowerCase();\n if (\n [\n SlotRuleServiceType.THERMO_COOLING_ACTUATORS,\n SlotRuleServiceType.THERMO_HEATING_ACTUATORS,\n SlotRuleServiceType.THERMO_PROBE,\n SlotRuleServiceType.THERMO_THERMO,\n SlotRuleServiceType.THERMO_HEATING_PUMPS,\n SlotRuleServiceType.THERMO_COOLING_PUMPS,\n SlotRuleServiceType.THERMO_SHARED_ACTUATORS,\n SlotRuleServiceType.THERMO_SHARED_PUMPS,\n ].includes(this.ruleServiceType)\n ) {\n const roomObject = this.linkableObject as ThermoRoomObjectDTO;\n const systemControlType = {\n [ThermoTypeOfObject.Heating]: roomObject.heatingSystemControlType,\n [ThermoTypeOfObject.Cooling]: roomObject.coolingSystemControlType,\n [ThermoTypeOfObject.HeatingAndCooling]:\n roomObject.sharedSystemControlType,\n [ThermoTypeOfObject.None]: SystemControlType.None,\n }[roomObject.thermoTypeOfObject ?? ThermoTypeOfObject.None];\n switch (systemControlType) {\n case SystemControlType.TwoTubesOnOffValve:\n case SystemControlType.TwoTubesProportionalValve:\n case SystemControlType.TwoTubesProportionalSpeedControlValve:\n case SystemControlType.FourTubesOnOffValve:\n case SystemControlType.FourTubesProportionalValve:\n case SystemControlType.FourTubesProportionalSpeedControlValve: {\n valveOrFancoilControlType = this.$t(\n 'AppResource.Fancoil'\n ).toLowerCase();\n break;\n }\n }\n\n let currentAssignActuatorStepType = ThermoActuatorType.None as ThermoActuatorType;\n currentAssignActuatorStepType = convertThermoRuleServiceTypeToThermoActuatorType(\n this.ruleServiceType,\n true\n );\n switch (currentAssignActuatorStepType) {\n case ThermoActuatorType.HeatingValve:\n case ThermoActuatorType.CoolingValve:\n {\n if (\n this.objectSlot.status == SlotStatus.MarkedForLinking ||\n this.objectSlot.status == SlotStatus.MarkedAdjacent ||\n this.isLinkedWithCurrentRoomObject\n ) {\n switch (this.currentThermoActuatorType) {\n case ThermoActuatorType.HeatingValve: {\n return `${this.$t('AppResource.LinkedAs')} ${this.$t(\n 'AppResource.Heating'\n ).toLowerCase()} ${valveOrFancoilControlType}`;\n }\n case ThermoActuatorType.CoolingValve: {\n return `${this.$t('AppResource.LinkedAs')} ${this.$t(\n 'AppResource.Cooling'\n ).toLowerCase()} ${valveOrFancoilControlType}`;\n }\n case ThermoActuatorType.HeatingAndCoolingValve: {\n return `${this.$t('AppResource.LinkedAs')} ${this.$t(\n 'AppResource.HeatingAndCooling'\n ).toLowerCase()} ${valveOrFancoilControlType}`;\n }\n case ThermoActuatorType.HeatingPump:\n case ThermoActuatorType.CoolingPump:\n case ThermoActuatorType.HeatingAndCoolingPump: {\n return `${this.$t('AppResource.LinkedAs')} ${this.$t(\n 'AppResource.Pump'\n ).toLowerCase()}`;\n }\n }\n }\n }\n break;\n case ThermoActuatorType.SharedValve:\n case ThermoActuatorType.SharedPump:\n {\n if (\n this.objectSlot.status == SlotStatus.MarkedForLinking ||\n this.objectSlot.status == SlotStatus.MarkedAdjacent ||\n this.isLinkedWithCurrentRoomObject\n ) {\n switch (this.currentThermoActuatorType) {\n case ThermoActuatorType.SharedValve: {\n return `${this.$t(\n 'AppResource.LinkedAs'\n )} ${valveOrFancoilControlType}`;\n }\n case ThermoActuatorType.SharedPump: {\n return `${this.$t('AppResource.LinkedAs')} ${this.$t(\n 'AppResource.Pump'\n ).toLowerCase()}`;\n }\n }\n }\n }\n break;\n case ThermoActuatorType.HeatingPump:\n case ThermoActuatorType.CoolingPump:\n {\n if (\n this.objectSlot.status == SlotStatus.MarkedForLinking ||\n this.objectSlot.status == SlotStatus.MarkedAdjacent ||\n this.isLinkedWithCurrentRoomObject\n ) {\n if (\n this.currentThermoActuatorType ==\n ThermoActuatorType.HeatingValve ||\n this.currentThermoActuatorType ==\n ThermoActuatorType.CoolingValve ||\n this.currentThermoActuatorType == ThermoActuatorType.SharedValve\n ) {\n return `${this.$t(\n 'AppResource.LinkedAs'\n )} ${valveOrFancoilControlType}`;\n }\n\n switch (this.currentThermoActuatorType) {\n //case ThermoActuatorType.HeatingValve: commented because already covered above. Typescript warns out this\n //case ThermoActuatorType.CoolingValve: commented because already covered above. Typescript warns out this\n case ThermoActuatorType.HeatingAndCoolingValve: {\n return `${this.$t(\n 'AppResource.LinkedAs'\n )} ${valveOrFancoilControlType}`;\n }\n case ThermoActuatorType.HeatingPump: {\n return `${this.$t('AppResource.LinkedFor')} ${this.$t(\n 'AppResource.Heating'\n ).toLowerCase()}`;\n }\n case ThermoActuatorType.CoolingPump: {\n return `${this.$t('AppResource.LinkedFor')} ${this.$t(\n 'AppResource.Cooling'\n ).toLowerCase()}`;\n }\n case ThermoActuatorType.HeatingAndCoolingPump: {\n return `${this.$t('AppResource.LinkedFor')} ${this.$t(\n 'AppResource.HeatingAndCooling'\n ).toLowerCase()}`;\n }\n }\n }\n }\n break;\n }\n }\n\n if (\n this.objectSlot.status == SlotStatus.MarkedForLinking ||\n this.objectSlot.status == SlotStatus.MarkedAdjacent ||\n (this.isLinkedWithCurrentRoomObject &&\n this.objectSlot.status == SlotStatus.Configured)\n ) {\n return `${this.$t('AppResource.LinkedFor')} ${this.linkableObject.name}`;\n }\n\n return this.objectSlot.status == SlotStatus.NotUsed\n ? this.$t('AppResource.NotUsed')\n : this.$t('AppResource.Available');\n }\n\n toggleSlot() {\n this.slotRuleService.onSlotMessage(this.device, this.objectSlot);\n }\n\n //confirm 'yes/no' action\n doYesCommandBtn() {\n if (this.popupData) this.popupData.isWarningRequested = false;\n if (this.doYesCommand) this.doYesCommand();\n }\n\n //confirm 'yes/no' action\n doNoCommandBtn() {\n if (this.popupData) this.popupData.isWarningRequested = false;\n if (this.doNoCommand) this.doNoCommand();\n }\n\n //alert 'ok' popup action\n doAlertCommandBtn() {\n if (this.popupData) this.popupData.isWarningRequested = false;\n if (this.doAlertCommand) this.doAlertCommand();\n }\n\n //confirm 'yes/no' preset management, currently used only for specific commands\n doPresetYesCommandBtn() {\n if (this.popupData) this.popupData.isPresetWarningRequested = false;\n if (this.doYesCommand) this.doYesCommand();\n }\n\n //confirm 'yes/no' preset management, currently used only for specific commands\n doPresetNoCommandBtn() {\n if (this.popupData) this.popupData.isPresetWarningRequested = false;\n if (this.doNoCommand) this.doNoCommand();\n }\n}\n","import { render } from \"./SlotListItem.vue?vue&type=template&id=61ae72e8&ts=true\"\nimport script from \"./SlotListItem.ts?vue&type=script&lang=ts\"\nexport * from \"./SlotListItem.ts?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/home/vsts/work/1/s/Frontend/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import { Options, Vue } from 'vue-class-component';\nimport {\n ComponentType,\n ConfigurationType,\n DeviceDTO,\n ILinkableObject,\n SlotStatus,\n Slot,\n} from '@/../client-generator/generated-clients/plants';\nimport { PropType } from 'vue';\nimport SlotListItem from './SlotItem/SlotListItem.vue';\nimport SlotItemOverview from './SlotItem/SlotItemOverview.vue';\nimport { SlotRuleServiceType } from '@/core/services/slots-assign-rules-service/slots-assign-rules-interfaces';\nimport DeviceSlotsListOverview from '@/views/components/DeviceAndSlotDetail/DeviceSlotsListOverview/DeviceSlotsListOverview.vue';\n\ntype SlotExtended = Slot & {\n showBar?: boolean;\n};\n\n@Options({\n name: 'DeviceAndSlotDetail',\n props: {\n device: {\n type: Object as PropType,\n required: true,\n },\n isAdd: {\n type: Boolean,\n required: true,\n },\n isSingleDeviceSelection: {\n type: Boolean,\n default: false,\n },\n isOnlyDeviceSelection: {\n type: Boolean,\n default: false,\n },\n linkableObject: {\n type: Object as PropType,\n required: true,\n },\n ruleServiceType: {\n type: Number,\n required: true,\n },\n },\n emits: ['add-device', 'remove-device'],\n components: {\n SlotListItem,\n SlotItemOverview,\n DeviceSlotsListOverview,\n },\n})\nexport default class DeviceAndSlotDetail extends Vue {\n SlotStatus = SlotStatus;\n device!: DeviceDTO;\n isAdd!: boolean;\n isSingleDeviceSelection!: boolean;\n isOnlyDeviceSelection!: boolean;\n linkableObject!: ILinkableObject;\n ruleServiceType!: SlotRuleServiceType;\n isExpanded = false;\n\n get compatibleComponentTypes() {\n switch (this.ruleServiceType) {\n case SlotRuleServiceType.AUTOMATION_ACTUATOR:\n return [ComponentType.Actuator, ComponentType.None];\n case SlotRuleServiceType.AUTOMATION_COMMAND:\n case SlotRuleServiceType.COMMANDS_AND_GROUPS:\n return [ComponentType.Command, ComponentType.None];\n case SlotRuleServiceType.THERMO_HEATING_ACTUATORS:\n case SlotRuleServiceType.THERMO_COOLING_ACTUATORS:\n case SlotRuleServiceType.THERMO_SHARED_ACTUATORS:\n case SlotRuleServiceType.THERMO_HEATING_PUMPS:\n case SlotRuleServiceType.THERMO_COOLING_PUMPS:\n case SlotRuleServiceType.THERMO_SHARED_PUMPS:\n return [ComponentType.Actuator, ComponentType.None];\n }\n }\n\n get compatibleSlots() {\n const slots: SlotExtended[] | undefined = this.device.slots?.filter(\n (k) =>\n !k.isSetting &&\n (this.device.componentTypes?.includes(\n ComponentType.ShutterActuatorCommand\n ) ||\n (k.assignedComponentType &&\n this.compatibleComponentTypes?.includes(k.assignedComponentType)))\n );\n\n slots?.forEach((s, i) => {\n if (\n (s.configurationType === ConfigurationType.Mostrine &&\n slots[i - 1] &&\n slots[i - 1].configurationType === ConfigurationType.Mostrine) ||\n (s.configurationType === ConfigurationType.Mostrine &&\n slots[i + 1] &&\n slots[i + 1].configurationType === ConfigurationType.Mostrine)\n ) {\n // @ts-ignore\n s.showBar = true;\n }\n });\n\n return slots;\n }\n\n addDevice() {\n this.$emit('add-device', JSON.parse(JSON.stringify(this.device)));\n }\n\n removeDevice() {\n this.$emit('remove-device', this.device);\n }\n\n toggleExpand() {\n this.isExpanded = !this.isExpanded;\n }\n}\n","import { render } from \"./DeviceAndSlotDetail.vue?vue&type=template&id=4410f828&ts=true\"\nimport script from \"./DeviceAndSlotDetail.ts?vue&type=script&lang=ts\"\nexport * from \"./DeviceAndSlotDetail.ts?vue&type=script&lang=ts\"\n\nimport \"./DeviceAndSlotDetail.scss?vue&type=style&index=0&lang=scss\"\n\nimport exportComponent from \"/home/vsts/work/1/s/Frontend/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createBlock as _createBlock, resolveComponent as _resolveComponent, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"slots-item-list mt-2\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_SlotItemOverview = _resolveComponent(\"SlotItemOverview\")\n\n return (_openBlock(), _createBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.filteredSlotList, (slot) => {\n return (_openBlock(), _createBlock(_component_SlotItemOverview, {\n key: slot,\n objectSlot: slot,\n isAdd: _ctx.isAdd,\n device: _ctx.device,\n linkableObject: _ctx.linkableObject,\n ruleServiceType: _ctx.ruleServiceType\n }, null, 8, [\"objectSlot\", \"isAdd\", \"device\", \"linkableObject\", \"ruleServiceType\"]))\n }), 128))\n ]))\n}","import { Options, Vue } from 'vue-class-component';\nimport { PropType } from 'vue';\nimport {\n ComponentType,\n DeviceDTO,\n ILinkableObject,\n Slot,\n} from '@/../client-generator/generated-clients/plants';\nimport SlotItemOverview from '../SlotItem/SlotItemOverview.vue';\nimport { SlotRuleServiceType } from '@/core/services/slots-assign-rules-service/slots-assign-rules-interfaces';\n\n@Options({\n name: 'DeviceSlotsList',\n props: {\n device: {\n type: Object as PropType,\n required: true,\n },\n slotList: {\n type: Object as PropType,\n required: true,\n },\n linkableObject: {\n type: Object as PropType,\n },\n isAdd: {\n type: Boolean,\n default: false,\n },\n ruleServiceType: {\n type: Number,\n default: -1,\n },\n },\n components: {\n SlotItemOverview,\n },\n})\nexport default class DeviceSlotsListOverview extends Vue {\n device!: DeviceDTO;\n slotList!: Slot[]; //use this instead device.slots, because might be filtered by outside if slot are not compatible\n linkableObject!: ILinkableObject;\n isAdd!: boolean;\n ruleServiceType!: SlotRuleServiceType;\n\n get filteredSlotList(): Slot[] {\n return this.slotList.filter((s) => !s.isSetting);\n }\n}\n","import { render } from \"./DeviceSlotsListOverview.vue?vue&type=template&id=34508506&ts=true\"\nimport script from \"./DeviceSlotsListOverview.ts?vue&type=script&lang=ts\"\nexport * from \"./DeviceSlotsListOverview.ts?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/home/vsts/work/1/s/Frontend/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"sourceRoot":""}